Bug fixed: Plugin Names Conflict
This commit is contained in:
parent
9f5db273a4
commit
169e250bd1
@ -20,20 +20,11 @@ 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;
|
||||||
if (!empty($plugin_text)){
|
|
||||||
require_once $value;
|
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 ($TAG.$plugin_name == $text or $TAG.$plugin_name.'@'.BOT_NAME == $text) {
|
||||||
$plugin_text = $matches[2];
|
|
||||||
$plugin_sendto = $from;
|
$plugin_sendto = $from;
|
||||||
if (!empty($plugin_text)){
|
|
||||||
require_once $value;
|
|
||||||
}else{
|
|
||||||
$BOT->msg($plugin_sendto, "Missing argument(s)");
|
$BOT->msg($plugin_sendto, "Missing argument(s)");
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
11
VAR_BOT.php
11
VAR_BOT.php
@ -20,20 +20,11 @@ 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;
|
||||||
if (!empty($plugin_text)){
|
|
||||||
require_once $value;
|
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 ($TAG.$plugin_name == $text or $TAG.$plugin_name.'@'.BOT_NAME == $text) {
|
||||||
$plugin_text = $matches[2];
|
|
||||||
$plugin_sendto = $from;
|
$plugin_sendto = $from;
|
||||||
if (!empty($plugin_text)){
|
|
||||||
require_once $value;
|
|
||||||
}else{
|
|
||||||
$BOT->msg($plugin_sendto, "Missing argument(s)");
|
$BOT->msg($plugin_sendto, "Missing argument(s)");
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
11
index.php
11
index.php
@ -20,20 +20,11 @@ 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;
|
||||||
if (!empty($plugin_text)){
|
|
||||||
require_once $value;
|
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 ($TAG.$plugin_name == $text or $TAG.$plugin_name.'@'.BOT_NAME == $text) {
|
||||||
$plugin_text = $matches[2];
|
|
||||||
$plugin_sendto = $from;
|
$plugin_sendto = $from;
|
||||||
if (!empty($plugin_text)){
|
|
||||||
require_once $value;
|
|
||||||
}else{
|
|
||||||
$BOT->msg($plugin_sendto, "Missing argument(s)");
|
$BOT->msg($plugin_sendto, "Missing argument(s)");
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user