4 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
38 require_once
'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
39 require_once
'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
40 require_once
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
58 case 'disconnectedUsers':
75 foreach($deletableRooms as $deletableRoom) {
80 $room->closePrivateRoom($deletableRoom[
'proom_id'], $chat_user, $settings);
81 $query = http_build_query( $params );
83 $message = json_encode( array(
84 'type' =>
'private_room_deleted',
85 'timestamp' => date(
'c' ),
87 'id' => $deletableRoom[
'proom_id'],
88 'proom_id' => $deletableRoom[
'proom_id'],
90 'message'=>
'room deleted',
96 $result = $connector->sendMessage( $room->getRoomId(), $message, array(
'public' => 1) );
110 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
112 foreach( $usersByScope as $scope => $users )
114 $users = explode(
',', $users );
117 if( $chatroom instanceof
ilChatroom && is_array( $users ) )
119 $users = array_filter( $users );
121 $message = json_encode( array(
122 'type' =>
'disconnected',
123 'users' => $userDetails,
124 'timestamp' => date(
'c' )
127 $chatroom->disconnectUsers( $users );
129 $this->
getConnector()->sendMessage( $chatroom->getRoomId(), $message );
131 if(
true || $chatroom->getSetting(
'enable_history' ) ) {
132 $messageObject = array(
133 'type' =>
'disconnected',
134 'users' => $userDetails,
135 'timestamp' => date(
'c' )
138 $chatroom->addHistoryEntry( $messageObject );
150 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
158 $rset = $ilDB->query(
'SELECT userdata FROM chatroom_users WHERE ' . $ilDB->in(
'user_id', $user_ids,
false,
'integer'));
160 while(
$row = $ilDB->fetchAssoc($rset)) {
161 $users[] = json_decode(
$row[
'userdata']);