fixed inclusions and replace \n with a new line char
authorpk910 <philipp@zoelle1.de>
Sun, 27 Nov 2011 03:21:43 +0000 (04:21 +0100)
committerpk910 <philipp@zoelle1.de>
Sun, 27 Nov 2011 03:21:43 +0000 (04:21 +0100)
Bots/CGod.class.php
tmp/includes.h

index 4871694f1c3f45e1925105605c01cea92b368e25..efc2bd68f7e876144b56ed494a46001f8dbdc3ae 100644 (file)
@@ -92,7 +92,7 @@ class {$_NAME} extends Bot {
                                $entry['channel'] = $channel;
                 $entry['id'] = rand(1, 999999);
                 $fp = fopen("tmp/debug_".$entry['id'].".c", "w");
-                fwrite($fp, "#include \"includes.h\"\n".$exp[1]);
+                fwrite($fp, "#include \"includes.h\"\n".str_replace(array("\\n"), array("\n"),$exp[1]));
                 fclose($fp);
                 $err = shell_exec("gcc -o tmp/debug_".$entry['id']." tmp/debug_".$entry['id'].".c 2>&1");
                 if($err) {
index f5af34718ee1538c0b5b19170e7e07e91662bb9e..b91b474d4198a87fb1fe5a7802321ddc5a48cdc6 100644 (file)
@@ -1,11 +1,13 @@
 
-#include "ctype.h"
-#include "float.h"
-#include "iso646.h"
-#include "limits.h"
-#include "math.h"
-#include "stddef.h"
-#include "stdio.h"
-#include "stdlib.h"
-#include "string.h"
-#include "time.h"
+#include <ctype.h>
+#include <float.h>
+#include <iso646.h>
+#include <limits.h>
+#include <math.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include <unistd.h>
\ No newline at end of file