2015-05-29 11:20:55 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once('config.inc.php');
|
|
|
|
require_once('functions.php');
|
|
|
|
$plugins = [];
|
|
|
|
|
2015-06-04 03:15:34 -05:00
|
|
|
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));
|
|
|
|
}
|
2015-05-29 11:20:55 -05:00
|
|
|
|
|
|
|
//load plugins
|
2015-06-26 00:19:40 -05:00
|
|
|
$load_plugins = glob(PATH.'plugins'.DIRECTORY_SEPARATOR.'*.php');
|
2015-05-29 11:20:55 -05:00
|
|
|
foreach ($load_plugins as $key => $value) {
|
2015-06-26 00:19:40 -05:00
|
|
|
if ($value == PATH.'plugins'.DIRECTORY_SEPARATOR.'help.php') {
|
2015-05-29 11:20:55 -05:00
|
|
|
unset($load_plugins[$key]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
foreach ($load_plugins as $value) {
|
|
|
|
require_once $value;
|
|
|
|
}
|
2015-06-26 00:19:40 -05:00
|
|
|
require_once PATH.'plugins'.DIRECTORY_SEPARATOR.'help.php';
|
2015-05-29 11:20:55 -05:00
|
|
|
}
|