40 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
41 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
53 $scope = $room->getRoomId();
61 $message = json_encode($messageObject);
64 'message' => $message,
68 $query = http_build_query($params);
69 $connector = $this->gui->getConnector();
70 $response = $connector->kick($scope,
$query);
71 $responseObject = json_decode($response);
73 if($responseObject->success ==
true)
75 $room->addHistoryEntry($messageObject,
'', 1);
77 $message = json_encode(array(
78 'type' =>
'userjustkicked',
79 'user' => $params[
'userToKick'],
83 $connector->sendMessage($room->getRoomId(), $message, array(
87 $room->disconnectUser(
new ilObjUser($params[
'userToKick']));
92 $response = json_encode(array(
94 'reason' =>
'unkown room'
112 $data =
new stdClass();
114 $data->user = $this->gui->object->getPersonalInformation( $chat_user );
115 $data->userToKick = $messageString;
116 $data->timestamp = date(
'c' );
117 $data->type =
'kick';
131 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
132 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
138 if(!$room->isOwnerOfPrivateRoom($ilUser->getId(),
$_REQUEST[
'sub']))
146 $scope = $room->getRoomId();
151 if($room->userIsInPrivateRoom($params[
'sub'], $params[
'user']))
153 $query = http_build_query($params);
154 $connector = $this->gui->getConnector();
155 $response = $connector->leavePrivateRoom($scope,
$query);
156 $responseObject = json_decode($response);
163 $room->unsubscribeUserFromPrivateRoom($params[
'sub'], $params[
'user']);
166 $message = json_encode(array(
167 'type' =>
'userjustkicked',
168 'user' => $params[
'user'],
169 'sub' => $params[
'sub']
172 $connector->sendMessage($room->getRoomId(), $message, array(
179 $response = json_encode(array(
181 'message' =>
'was not in room'
203 FROM chatroom_proomaccess
208 $types = array(
'integer',
'integer' );
209 $values = array( $subroom_id, $user_id );
211 $res = $ilDB->queryF(
$query, $types, $values );
213 if(
$row = $ilDB->fetchAssoc(
$res ) )
217 FROM chatroom_proomaccess
222 $ilDB->manipulateF( $delete, $types, $values );