diff --git a/BOT.php b/QUERY_BOT.php similarity index 97% rename from BOT.php rename to QUERY_BOT.php index ead8735..c925899 100644 --- a/BOT.php +++ b/QUERY_BOT.php @@ -1,5 +1,6 @@ $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; + require_once $value; + 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; + require_once $value; + break; + } + } + } + require_once PATH.'plugins'.DIRECTORY_SEPARATOR.'help.php'; + + + +?> \ No newline at end of file diff --git a/config.php b/config.php index b1628c4..69db27c 100644 --- a/config.php +++ b/config.php @@ -1,5 +1,5 @@