4 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
31 case 'disconnectedUsers':
32 if (isset($_REQUEST[
'scope'])) {
51 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
53 foreach ($usersByScope as $scope =>
$users) {
61 'type' =>
'disconnected',
62 'users' => $userDetails,
63 'timestamp' => date(
'c')
66 $chatroom->disconnectUsers(
$users);
68 if (!isset($_REQUEST[
'handledAction']) || $_REQUEST[
'handledAction'] !=
'kick') {
72 if (
true || $chatroom->getSetting(
'enable_history')) {
73 $messageObject = array(
74 'type' =>
'disconnected',
75 'users' => $userDetails,
76 'timestamp' => date(
'c')
79 $chatroom->addHistoryEntry($messageObject);
93 require_once
'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
94 require_once
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
108 foreach ($deletableRooms as $deletableRoom) {
112 $room->closePrivateRoom($deletableRoom[
'proom_id']);
116 'type' =>
'private_room_deleted',
117 'timestamp' => date(
'c'),
119 'id' => $deletableRoom[
'proom_id'],
120 'proom_id' => $deletableRoom[
'proom_id'],
122 'message' =>
'room deleted',
128 $result = $connector->sendMessage($room->getRoomId(),
$message, array(
'public' => 1));
138 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
handleCommand($task)
Calls command depending on given $task.
Class ilChatroomServerHandler.
static getDefaultConfiguration()
Instantiates and returns ilChatroomAdmin object using instance_id and settings from settingsTable...
getConnector()
Returns connector Instantiates ilChatroomServerConnector with server settings and returns it...
static byRoomId($room_id, $initObject=false)
Returns ilChatroom by given $room_id.
serverStarted()
Requires ilChatroom and calls its disconnectAllUsersFromAllRooms() method.
catch(Exception $e) $message
static getUserInformation(array $usrIds, int $roomId=null)
Class ilChatroomServerConnector.
static findDeletablePrivateRooms()
__construct()
Constructor Calls $this->handleCommand method.
static disconnectAllUsersFromAllRooms()
Deletes all entrys from userTable.
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.