diff --git a/classes/Web/Base.php b/classes/Web/Base.php index 9206781..ba6c584 100644 --- a/classes/Web/Base.php +++ b/classes/Web/Base.php @@ -3,7 +3,7 @@ class Base { public function msg($id, $msg) { - echo $msg; + echo "
".$msg;
         return;
     }
 }
\ No newline at end of file
diff --git a/classes/Web/init.php b/classes/Web/init.php
index 49dcc05..65d286b 100644
--- a/classes/Web/init.php
+++ b/classes/Web/init.php
@@ -2,4 +2,10 @@
 $BOT = new Base;
 
     $from = 'WebClient';
-    $text = $_GET['c'];
\ No newline at end of file
+    if (file_get_contents("php://input")) {
+        $text = file_get_contents("php://input");
+    }elseif (!empty($_SERVER['QUERY_STRING'])){
+        $text = $_SERVER['QUERY_STRING'];
+    }else{
+        exit;
+    }
\ No newline at end of file
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..721c2fc
--- /dev/null
+++ b/index.php
@@ -0,0 +1,49 @@
+ $value) {
+    if ($value == PATH.'plugins'.DIRECTORY_SEPARATOR.'help.php') {
+        unset($load_plugins[$key]);
+    }
+}
+foreach ($TAGs as $TAG) {
+    foreach ($load_plugins as $value) {
+        $plugin_name = substr($value, strlen(PATH.'plugins'.DIRECTORY_SEPARATOR), -4);
+        if (preg_match("/^(".preg_quote($TAG, '/').$plugin_name."|".preg_quote($TAG, '/').$plugin_name.preg_quote('@').BOT_NAME.") (.*)$/", $text, $matches)) {
+            $plugin_text = $matches[2];
+            $plugin_sendto = $from;
+            if (!empty($plugin_text)){
+                require_once $value;
+            }else{
+                $BOT->msg($plugin_sendto, "Missing argument(s)");
+            }   
+            break;
+        }elseif (preg_match("/^(".preg_quote($TAG, '/').$plugin_name.")|(".preg_quote($TAG, '/').$plugin_name.preg_quote('@').BOT_NAME.")$/", $text)) {
+            $plugin_text = $matches[2];
+            $plugin_sendto = $from;
+            if (!empty($plugin_text)){
+                require_once $value;
+            }else{
+                $BOT->msg($plugin_sendto, "Missing argument(s)");
+            }   
+            break;
+        }
+    }
+}
+require_once PATH.'plugins'.DIRECTORY_SEPARATOR.'help.php';
+
+//function
+function PluginSet($desc){
+        global $plugins,$plugin_name,$TAG;
+        $plugins[] .= $TAG.$plugin_name." ".$desc;
+}
+
+?>
\ No newline at end of file