-#!./php -q
+#!/usr/bin/php -q
<?php
echo "Moodle chat daemon v1.0 (\$Id$)\n\n";
$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;
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");