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' );
107 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", ROOT_FOLDER_ID);
108 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
116 $scope = $room->getRoomId();
125 $message = json_encode($messageObject);
129 'message' => $message,
133 $query = http_build_query($params);
134 $connector = $this->gui->getConnector();
135 $response = $connector->kick($scope,
$query);
136 $responseObject = json_decode($response);
140 if($responseObject->success ==
true)
142 $room->addHistoryEntry($messageObject,
'', 1);
144 $message = json_encode(array(
145 'type' =>
'userjustkicked',
146 'user' => $params[
'userToKick'],
150 $connector->sendMessage($room->getRoomId(), $message, array(
156 $room->disconnectUser($params[
'userToKick']);
161 $response = json_encode(array(
163 'reason' =>
'unkown room'
181 $data =
new stdClass();
183 $data->user = $this->gui->object->getPersonalInformation( $user );
184 $data->userToKick = $messageString;
185 $data->timestamp = date(
'c' );
186 $data->type =
'kick';