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';
43 $settings = ilChatroomAdmin::getDefaultConfiguration()->getServerSettings();
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 );
131 $this->
getConnector()->sendMessage( $chatroom->getRoomId(), $message );
134 if(
true || $chatroom->getSetting(
'enable_history' ) ) {
135 $messageObject = array(
136 'type' =>
'disconnected',
137 'users' => $userDetails,
138 'timestamp' => date(
'c' )
141 $chatroom->addHistoryEntry( $messageObject );
153 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
161 $rset = $ilDB->query(
'SELECT userdata FROM chatroom_users WHERE ' . $ilDB->in(
'user_id', $user_ids,
false,
'integer'));
163 while(
$row = $ilDB->fetchAssoc($rset)) {
164 $users[] = json_decode(
$row[
'userdata']);