2015-05-29 11:20:55 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once('config.inc.php');
|
|
|
|
require_once('functions.php');
|
|
|
|
$plugins = [];
|
|
|
|
|
2015-05-29 12:30:08 -05:00
|
|
|
if($_GET['from'] != BOT_NAME){
|
2015-05-29 11:20:55 -05:00
|
|
|
//is group?
|
2015-05-29 12:30:08 -05:00
|
|
|
if ($_GET['to'] == BOT_NAME) {
|
2015-05-29 11:20:55 -05:00
|
|
|
$isgroup = false;
|
|
|
|
}else{
|
|
|
|
$isgroup = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//reply to...
|
|
|
|
if ($isgroup) {
|
|
|
|
$from = $_GET['to'];
|
|
|
|
}else{
|
|
|
|
$from = $_GET['from'];
|
2015-05-29 12:30:08 -05:00
|
|
|
$BOT->exec("msg ".escapePeer(OWNER_NAME)." ".json_encode($_GET));
|
2015-05-29 11:20:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//load plugins
|
|
|
|
$load_plugins = glob(dirname(__FILE__).DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'*.php');
|
|
|
|
foreach ($load_plugins as $key => $value) {
|
|
|
|
if ($value == dirname(__FILE__).DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'help.php') {
|
|
|
|
unset($load_plugins[$key]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
foreach ($load_plugins as $value) {
|
|
|
|
require_once $value;
|
|
|
|
}
|
|
|
|
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'help.php';
|
|
|
|
}
|