44 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
45 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
49 $ilCtrl->setParameterByClass(
'ilrepositorygui',
'ref_id', ROOT_FOLDER_ID);
50 $ilCtrl->redirectByClass(
'ilrepositorygui',
'');
58 $scope = $room->getRoomId();
66 $message = json_encode($messageObject);
69 'message' => $message,
73 $query = http_build_query($params);
74 $connector = $this->gui->getConnector();
75 $response = $connector->kick($scope,
$query);
76 $responseObject = json_decode($response);
78 if($responseObject->success ==
true)
80 $room->addHistoryEntry($messageObject,
'', 1);
82 $message = json_encode(array(
83 'type' =>
'userjustkicked',
84 'user' => $params[
'userToKick'],
88 $connector->sendMessage($room->getRoomId(), $message, array(
94 $room->disconnectUser($params[
'userToKick']);
99 $response = json_encode(array(
101 'reason' =>
'unkown room'
119 $data =
new stdClass();
121 $data->user = $this->gui->object->getPersonalInformation( $chat_user );
122 $data->userToKick = $messageString;
123 $data->timestamp = date(
'c' );
124 $data->type =
'kick';
138 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
139 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
145 if(!$room->isOwnerOfPrivateRoom($ilUser->getId(),
$_REQUEST[
'sub']))
149 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", ROOT_FOLDER_ID);
150 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
154 $scope = $room->getRoomId();
159 if($room->userIsInPrivateRoom($params[
'sub'], $params[
'user']))
161 $query = http_build_query($params);
162 $connector = $this->gui->getConnector();
163 $response = $connector->leavePrivateRoom($scope,
$query);
164 $responseObject = json_decode($response);
171 $room->unsubscribeUserFromPrivateRoom($params[
'sub'], $params[
'user']);
174 $message = json_encode(array(
175 'type' =>
'userjustkicked',
176 'user' => $params[
'user'],
177 'sub' => $params[
'sub']
180 $connector->sendMessage($room->getRoomId(), $message, array(
187 $response = json_encode(array(
189 'message' =>
'was not in room'
211 FROM chatroom_proomaccess
216 $types = array(
'integer',
'integer' );
217 $values = array( $subroom_id, $user_id );
219 $res = $ilDB->queryF(
$query, $types, $values );
221 if(
$row = $ilDB->fetchAssoc(
$res ) )
225 FROM chatroom_proomaccess
230 $ilDB->manipulateF( $delete, $types, $values );