too tired to desc

too tired to desc
This commit is contained in:
Denny Dai
2015-06-26 13:19:40 +08:00
parent 72a36e5164
commit 88c6a081dd
6 changed files with 11 additions and 16 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
require_once('config.inc.php');
require_once('functions.php');
$plugins = [];
if($_GET['from'] != escapePeer(BOT_NAME)){
//is group?
if ($_GET['to'] == escapePeer(BOT_NAME)) {
$isgroup = false;
}else{
$isgroup = true;
}
//reply to...
if ($isgroup) {
$from = $_GET['to'];
}else{
$from = $_GET['from'];
$BOT->exec("msg ".escapePeer(OWNER_NAME)." ".json_encode($_GET));
}
//load plugins
$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]);
}
}
foreach ($load_plugins as $value) {
require_once $value;
}
require_once PATH.'plugins'.DIRECTORY_SEPARATOR.'help.php';
}