From: pk910 Date: Sun, 27 Nov 2011 15:22:19 +0000 (+0100) Subject: damn case-sensitive java -.- X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=commitdiff_plain;h=71736011ab715dde2d9c37d1570521a8a9baf8e1 damn case-sensitive java -.- --- 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;