$string['currentchats'] = "Active chat sessions";
$string['currentusers'] = "Current users";
$string['enterchat'] = "Click here to enter the chat";
+$string['errornousers'] = "Could not find any users!";
$string['idle'] = "Idle";
$string['messagebeepseveryone'] = "\$a beeps everyone!";
$string['messagebeepsyou'] = "\$a has just beeped you!";
chat_delete_old_users();
-
-/// Get list of users
-
-if (!$chatusers = chat_get_users($chatuser->chatid)) {
- error("Could not find any users!");
-}
-
/// Print headers
$str->sec = get_string("sec");
$str->secs = get_string("secs");
+/// Get list of users
+
+if (!$chatusers = chat_get_users($chatuser->chatid)) {
+ print_string("errornousers");
+ exit;
+}
+
+
echo "<table width=\"100%\">";
foreach ($chatusers as $chatuser) {
$lastping = $timenow - $chatuser->lastmessageping;