minor bug fix

This commit is contained in:
dennydai 2016-01-26 12:37:22 +08:00
parent 5a6b8483a4
commit d8794a0336

View File

@ -20,12 +20,20 @@ foreach ($TAGs as $TAG) {
if (preg_match("/^(".preg_quote($TAG, '/').$plugin_name."|".preg_quote($TAG, '/').$plugin_name.preg_quote('@').BOT_NAME.") (.*)$/", $text, $matches)) { if (preg_match("/^(".preg_quote($TAG, '/').$plugin_name."|".preg_quote($TAG, '/').$plugin_name.preg_quote('@').BOT_NAME.") (.*)$/", $text, $matches)) {
$plugin_text = $matches[2]; $plugin_text = $matches[2];
$plugin_sendto = $from; $plugin_sendto = $from;
require_once $value; if (!empty($plugin_text)){
require_once $value;
}else{
$BOT->msg($plugin_sendto, "Missing argument(s)");
}
break; break;
}elseif (preg_match("/^(".preg_quote($TAG, '/').$plugin_name.")|(".preg_quote($TAG, '/').$plugin_name.preg_quote('@').BOT_NAME.")$/", $text)) { }elseif (preg_match("/^(".preg_quote($TAG, '/').$plugin_name.")|(".preg_quote($TAG, '/').$plugin_name.preg_quote('@').BOT_NAME.")$/", $text)) {
$plugin_text = $matches[2]; $plugin_text = $matches[2];
$plugin_sendto = $from; $plugin_sendto = $from;
require_once $value; if (!empty($plugin_text)){
require_once $value;
}else{
$BOT->msg($plugin_sendto, "Missing argument(s)");
}
break; break;
} }
} }