From 457406d30b9eac83d96596d998a1e96513b68e35 Mon Sep 17 00:00:00 2001 From: dennydai Date: Wed, 30 Dec 2015 21:37:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=AF=E6=8C=81=E5=A4=9A?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=90=8C=E6=97=B6=E5=90=AF=E7=94=A8=E7=AD=96?= =?UTF-8?q?=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BOT.php => QUERY_BOT.php | 1 + VAR_BOT.php | 39 +++++++++++++++++++++++++++++++++++++++ config.php | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) rename BOT.php => QUERY_BOT.php (97%) create mode 100644 VAR_BOT.php 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 @@