From 3430873206a45b5c7a6e0d1adb33cc60c7203553 Mon Sep 17 00:00:00 2001 From: defacer Date: Mon, 23 Aug 2004 08:48:57 +0000 Subject: [PATCH] Making chatd more eager to update the users' status, and lib.php slightly 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 | 6 +++--- mod/chat/lib.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/chat/chatd.php b/mod/chat/chatd.php index 714fd0c4ca..4b13452ab6 100755 --- a/mod/chat/chatd.php +++ b/mod/chat/chatd.php @@ -1,4 +1,4 @@ -#!./php -q +#!/usr/bin/php -q 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; diff --git a/mod/chat/lib.php b/mod/chat/lib.php index 5f5e70f21e..c3d430ad52 100644 --- a/mod/chat/lib.php +++ b/mod/chat/lib.php @@ -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"); -- 2.39.5