2015-05-29 11:20:55 -05:00
|
|
|
<?php
|
|
|
|
//init
|
2015-06-26 00:37:54 -05:00
|
|
|
require_once('config.php');
|
|
|
|
require_once('functions.php');
|
|
|
|
$plugins = [];
|
|
|
|
|
|
|
|
require(PATH.'classes'.DIRECTORY_SEPARATOR.TYPE.DIRECTORY_SEPARATOR.'Base.php');
|
|
|
|
require_once(PATH.'classes'.DIRECTORY_SEPARATOR.TYPE.DIRECTORY_SEPARATOR.'init.php');
|
|
|
|
|
|
|
|
//load plugins
|
2015-06-30 02:05:22 -05:00
|
|
|
|
2015-06-26 00:37:54 -05:00
|
|
|
$load_plugins = glob(PATH.'plugins'.DIRECTORY_SEPARATOR.'*.php');
|
|
|
|
foreach ($load_plugins as $key => $value) {
|
|
|
|
if ($value == PATH.'plugins'.DIRECTORY_SEPARATOR.'help.php') {
|
|
|
|
unset($load_plugins[$key]);
|
|
|
|
}
|
|
|
|
}
|
2015-06-30 02:05:22 -05:00
|
|
|
|
2015-06-30 15:35:29 -05:00
|
|
|
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;
|
|
|
|
}
|
2015-06-30 02:05:22 -05:00
|
|
|
}
|
2015-06-26 00:37:54 -05:00
|
|
|
}
|
|
|
|
require_once PATH.'plugins'.DIRECTORY_SEPARATOR.'help.php';
|
|
|
|
|
2015-06-30 02:05:22 -05:00
|
|
|
|
|
|
|
|
2015-05-29 11:20:55 -05:00
|
|
|
?>
|