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]);
}
}
}
";
};
- $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);
$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;