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()
79 if( !is_array( $users ) )
82 $ilCtrl->redirect( $this->gui,
'ban-show' );
86 $room->unbanUser( $users );
88 $ilCtrl->redirect( $this->gui,
'ban-show' );
112 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", ROOT_FOLDER_ID);
113 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
121 $scope = $room->getRoomId();
130 $message = json_encode($messageObject);
134 'message' => $message,
138 $query = http_build_query($params);
139 $connector = $this->gui->getConnector();
140 $response = $connector->kick($scope,
$query);
141 $responseObject = json_decode($response);
145 if($responseObject->success ==
true)
147 $room->addHistoryEntry($messageObject,
'', 1);
149 $message = json_encode(array(
150 'type' =>
'userjustkicked',
151 'user' => $params[
'userToKick'],
155 $connector->sendMessage($room->getRoomId(), $message, array(
161 $room->disconnectUser($params[
'userToKick']);
166 $response = json_encode(array(
168 'reason' =>
'unkown room'
186 $data =
new stdClass();
188 $data->user = $this->gui->object->getPersonalInformation( $user );
189 $data->userToKick = $messageString;
190 $data->timestamp = date(
'c' );
191 $data->type =
'kick';