2 /******************************* PHP-P10 v2 *****************************
3 * Copyright (C) 2011 Philipp Kreil (pk910) *
5 * This program is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 3 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 ************************************************************************
26 error_reporting(E_ALL & ~E_STRICT);
28 require_once("Uplink/Uplink.class.php");
29 require_once("ModCMD/ModCMD.class.php");
30 require_once("BotLoader/BotLoader.class.php");
31 require_once("Tools/timer.inc.php");
33 if(function_exists("pcntl_signal")) {
34 pcntl_signal(SIGINT, 'shutdown');
35 pcntl_signal(SIGTERM, 'shutdown');
38 //basicly here is nothing, yet :D
39 $uplink = new Uplink();
40 require_once("config.inc.php");
42 $uplink->setEventHandler(ModCMD::getEventHandler());
44 $uplink->initialize();
46 $botloader = new BotLoader($uplink);
47 $botloader->loadBots();
48 BotLoader::load("ModManager", "ModManager.class.php");
50 function shutdown($signal = 0) {
53 echo "\n\nrecived shutdown instruction...\n";
54 $botloader->unloadBots();
64 if(function_exists("pcntl_signal_dispatch"))
65 pcntl_signal_dispatch();