damn case-sensitive java -.-
authorpk910 <philipp@zoelle1.de>
Sun, 27 Nov 2011 15:22:19 +0000 (16:22 +0100)
committerpk910 <philipp@zoelle1.de>
Sun, 27 Nov 2011 15:22:19 +0000 (16:22 +0100)
Bots/JavaGod.class.php

index f8d47c9389d9cb76ca51a9dfdacd343e93ccdbfd..1c0023e058d6111d11157af6e5cf4b0e8f831dbe 100644 (file)
@@ -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;