]> git.mjollnir.org Git - moodle.git/commitdiff
Making chatd more eager to update the users' status, and lib.php slightly
authordefacer <defacer>
Mon, 23 Aug 2004 08:48:57 +0000 (08:48 +0000)
committerdefacer <defacer>
Mon, 23 Aug 2004 08:48:57 +0000 (08:48 +0000)
less eager to declare them dead. Should solve the "active users are not shown
at the chat index page" problem.

Also, fixing a notice.

mod/chat/chatd.php
mod/chat/lib.php

index 714fd0c4cae4094eb3fd01061a1273bbc75663a3..4b13452ab656b97072226d9a123f1ccfec4f0e0e 100755 (executable)
@@ -1,4 +1,4 @@
-#!./php -q
+#!/usr/bin/php -q
 <?php
 
 echo "Moodle chat daemon v1.0  (\$Id$)\n\n";
@@ -630,11 +630,11 @@ $DAEMON->trace_level = E_ALL;
 $DAEMON->socketserver_refresh = 20;
 $DAEMON->can_daemonize = function_exists('pcntl_fork');
 $DAEMON->beepsoundsrc = $CFG->wwwroot.'/mod/chat/beep.wav';
-$DAEMON->live_data_update_threshold = 30;
+$DAEMON->live_data_update_threshold = 15;
 
 /// Check the parameters //////////////////////////////////////////////////////
 
-    $param = trim(strtolower($argv[1]));
+    $param = empty($argv[1]) ? NULL : trim(strtolower($argv[1]));
 
     if (empty($param) || eregi('^(\-\-help|\-h)$', $param)) {
         echo 'Starts the Moodle chat socket server on port '.$CFG->chat_serverport;
index 5f5e70f21efcdf51224945a97bece467c7442c94..c3d430ad524c73607796bc13219c558fe0fbd15b 100644 (file)
@@ -9,7 +9,7 @@ if (!isset($CFG->chat_refresh_userlist)) {
     set_config("chat_refresh_userlist", 10);
 }
 if (!isset($CFG->chat_old_ping)) {
-    set_config("chat_old_ping", 30);
+    set_config("chat_old_ping", 35);
 }
 if (!isset($CFG->chat_method)) {
     set_config("chat_method", "header_js");