easy to set config

This commit is contained in:
Denny Dai
2015-06-26 13:37:54 +08:00
parent 88c6a081dd
commit fce895bb21
4 changed files with 24 additions and 19 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<?php
namespace DBot\Telegram;
namespace DBot;
class Base
{
protected $_fp;
-15
View File
@@ -1,9 +1,5 @@
<?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)) {
@@ -20,15 +16,4 @@ if($_GET['from'] != escapePeer(BOT_NAME)){
$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';
}