4 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
30 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
43 include_once
'Modules/Chatroom/classes/class.ilChatroom.php';
47 $this->gui->switchToVisibleMode();
49 require_once
'Modules/Chatroom/classes/class.ilBannedUsersTableGUI.php';
52 $table->setFormAction( $ilCtrl->getFormAction( $this->gui,
'ban-show' ) );
58 $table->setData( $room->getBannedUsers() );
61 $this->gui->tpl->setVariable(
'ADM_CONTENT', $table->getHTML() );
69 public function delete()
75 if( !is_array( $users ) )
81 $room->unbanUser( $users );
83 $ilCtrl->redirect( $this->gui,
'ban-show' );
115 $scope = $room->getRoomId();
124 $message = json_encode($messageObject);
128 'message' => $message,
132 $query = http_build_query($params);
133 $connector = $this->gui->getConnector();
134 $response = $connector->kick($scope,
$query);
135 $responseObject = json_decode($response);
139 if($responseObject->success ==
true)
141 $room->addHistoryEntry($messageObject,
'', 1);
143 $message = json_encode(array(
144 'type' =>
'userjustkicked',
145 'user' => $params[
'userToKick'],
150 $connector->sendMessage($room->getRoomId(), $message, array(
154 $room->disconnectUser(
new ilObjUser($params[
'userToKick']));
159 $response = json_encode(array(
161 'reason' =>
'unkown room'
179 $data =
new stdClass();
181 $data->user = $this->gui->object->getPersonalInformation( $user );
182 $data->userToKick = $messageString;
183 $data->timestamp = date(
'c' );
184 $data->type =
'kick';