diff --git a/BOT.php b/BOT.php index 28b4ca9..e62f27a 100644 --- a/BOT.php +++ b/BOT.php @@ -16,16 +16,17 @@ require_once(PATH.'classes'.DIRECTORY_SEPARATOR.TYPE.DIRECTORY_SEPARATOR.'init.p } } - 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; + 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; + } } } - require_once PATH.'plugins'.DIRECTORY_SEPARATOR.'help.php'; diff --git a/config.php b/config.php index 4cf15c0..2de63ce 100644 --- a/config.php +++ b/config.php @@ -1,11 +1,11 @@ msg($from, $plugin_list); } - $plugin_list = HELP_BEGIN."\n"; - foreach ($plugins as $value) { - $plugin_list .= "\n".$value; - } - $plugin_list .= "\n\n".HELP_END; - $BOT->msg($from, $plugin_list); } \ No newline at end of file