4 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
32 case 'disconnectedUsers':
33 if(isset($_REQUEST[
'scope']))
53 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
55 foreach($usersByScope as $scope => $users)
57 $users = explode(
',', $users);
60 if($chatroom instanceof
ilChatroom && is_array($users))
62 $users = array_filter($users);
64 $message = json_encode(
array(
65 'type' =>
'disconnected',
66 'users' => $userDetails,
67 'timestamp' =>
date(
'c')
70 $chatroom->disconnectUsers($users);
72 if(!isset($_REQUEST[
'handledAction']) || $_REQUEST[
'handledAction'] !=
'kick')
74 $this->
getConnector()->sendMessage($chatroom->getRoomId(), $message);
77 if(
true || $chatroom->getSetting(
'enable_history'))
79 $messageObject =
array(
80 'type' =>
'disconnected',
81 'users' => $userDetails,
82 'timestamp' =>
date(
'c')
85 $chatroom->addHistoryEntry($messageObject);
95 $rset = $ilDB->query(
'SELECT userdata FROM chatroom_users WHERE ' . $ilDB->in(
'user_id', $user_ids,
false,
'integer'));
97 while(
$row = $ilDB->fetchAssoc($rset))
99 $users[] = json_decode(
$row[
'userdata']);
112 require_once
'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
113 require_once
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
115 $settings = ilChatroomAdmin::getDefaultConfiguration()->getServerSettings();
127 foreach($deletableRooms as $deletableRoom)
133 $room->closePrivateRoom($deletableRoom[
'proom_id']);
136 $message = json_encode(
array(
137 'type' =>
'private_room_deleted',
138 'timestamp' =>
date(
'c'),
140 'id' => $deletableRoom[
'proom_id'],
141 'proom_id' => $deletableRoom[
'proom_id'],
143 'message' =>
'room deleted',
149 $result = $connector->sendMessage($room->getRoomId(), $message,
array(
'public' => 1));
160 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
handleCommand($task)
Calls command depending on given $task.
Class ilChatroomServerHandler.
getConnector()
Returns connector Instantiates ilChatroomServerConnector with server settings and returns it...
static byRoomId($room_id, $initObject=false)
Returns ilChatroom by given $room_id ilDBInterface $ilDB.
serverStarted()
Requires ilChatroom and calls its disconnectAllUsersFromAllRooms() method.
getUserInformation($user_ids)
Class ilChatroomServerConnector.
static findDeletablePrivateRooms()
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
__construct()
Constructor Calls $this->handleCommand method.
static disconnectAllUsersFromAllRooms()
Deletes all entrys from userTable.
Create styles array
The data for the language used.
disconnectedUsers($usersByScope)
Calls $chatroom->disconnectUsers for every given user in every given scope ($usersByScope), sends corresponding status messages to chatroom and adds event in history.
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.