X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=blobdiff_plain;f=Bots%2FJavaGod.class.php;fp=Bots%2FJavaGod.class.php;h=1c0023e058d6111d11157af6e5cf4b0e8f831dbe;hp=f8d47c9389d9cb76ca51a9dfdacd343e93ccdbfd;hb=71736011ab715dde2d9c37d1570521a8a9baf8e1;hpb=bb2b4fd1501bb1a83855e1bf0305dbf3b1f7f8aa diff --git a/Bots/JavaGod.class.php b/Bots/JavaGod.class.php index f8d47c9..1c0023e 100644 --- a/Bots/JavaGod.class.php +++ b/Bots/JavaGod.class.php @@ -66,8 +66,8 @@ class {$_NAME} extends Bot { public function loop() { foreach($this->execcache as $id => $entry) { if(!$this->checkstate($entry)) { - unlink("tmp/debug_".$entry['id'].".java"); - unlink("tmp/debug_".$entry['id'].".class"); + unlink("tmp/Debug_".$entry['id'].".java"); + unlink("tmp/Debug_".$entry['id'].".class"); unset($this->execcache[$id]); } } @@ -113,10 +113,10 @@ class {$_NAME} extends Bot { } "; }; - $fp = fopen("tmp/debug_".$entry['id'].".java", "w"); + $fp = fopen("tmp/Debug_".$entry['id'].".java", "w"); fwrite($fp, $javacode); fclose($fp); - $err = shell_exec("javac tmp/debug_".$entry['id'].".java 2>&1"); + $err = shell_exec("javac tmp/Debug_".$entry['id'].".java 2>&1"); if($err) { $err=str_replace("\r","",$err); $lines=explode("\n",$err); @@ -131,12 +131,12 @@ class {$_NAME} extends Bot { $this->uplink->privmsg($this->bot, $entry['channel'], $line); } } - if(!file_exists("tmp/debug_".$entry['id'].".class")) { - unlink("tmp/debug_".$entry['id'].".java"); + if(!file_exists("tmp/Debug_".$entry['id'].".class")) { + unlink("tmp/Debug_".$entry['id'].".java"); break; } $descriptor = array(0 => array("pipe", "r"),1 => array("pipe", "w"),2 => array("pipe", "w")); - $entry['proc'] = proc_open('java tmp/debug_'.$entry['id'].'.class', $descriptor, $entry['pipes']); + $entry['proc'] = proc_open('java tmp/Debug_'.$entry['id'].'.class', $descriptor, $entry['pipes']); if(!is_resource($entry['proc'])) { $this->uplink->notice($this->bot, $user, "error while loading c!"); return;