Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
git-svn-id: https://cobihome.external.cluenet.org:8443/svn/phpserv/trunk@59 cb14c9df-8a02-4fc1-9b40-3ccfc4edb2c1
  • Loading branch information
cobi committed Jan 6, 2010
1 parent 43187f7 commit a16246d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/services/botserv.php
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ function sandbot ($nick) {
'posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_mkfifo,' .
'posix_mknod,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,' .
'posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,' .
'posix_uname,mail,error_log,unregister_tick_function,set_time_limit',
'posix_uname,mail,error_log',
'disable_classes'=>'');
$this->bots[$nick]['sandbox'] = new Runkit_Sandbox($options);
$this->bots[$nick]['sandbox']['output_handler'] = array($this,'sbotout');
Expand All @@ -938,7 +938,7 @@ function sandbot ($nick) {
$functions .= 'function get ($key, $default = "") { $cfg = unserialize(file_get_contents("cfg.ser")); if(isset($cfg[$key])) return $cfg[$key]; return $default; }';
$functions .= 'function set ($key, $value) { $cfg = unserialize(file_get_contents("cfg.ser")); $cfg[$key] = $value; file_put_contents("cfg.ser",serialize($cfg)); }';
//$functions .= 'function __trap_alrm ($s) { die("timeout"); }';
$functions .= 'function __trap_tick() { static $start = time(); if(time() - $start > 5) die("Timeout."); }';
$functions .= 'function __trap_tick () { static $start = null; if($start == null) $start = time(); if (time() - $start > 5) die("Timeout."); }';
//$functions .= 'pcntl_signal(SIGALRM, "__trap_alrm");';
//format_time (gnarfel)
$functions .= 'function format_time($seconds) {$secs = intval($seconds % 60); $mins =';
Expand Down

0 comments on commit a16246d

Please sign in to comment.