2 /******************************* PHP-P10 v2 *****************************
3 * Copyright (C) 2011-2012 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");
32 require_once("Tools/Table.class.php");
34 if(function_exists("pcntl_signal")) {
35 pcntl_signal(SIGINT, 'shutdown');
36 pcntl_signal(SIGTERM, 'shutdown');
39 //basicly here is nothing, yet :D
40 $uplink = new Uplink();
41 require_once("config.inc.php");
43 $uplink->setEventHandler(ModCMD::getEventHandler());
45 $uplink->initialize();
47 $botloader = new BotLoader($uplink);
48 $botloader->loadBots();
49 BotLoader::load("ModManager", "ModManager.class.php");
51 function shutdown($signal = 0) {
54 echo "\n\nrecived shutdown instruction...\n";
55 $botloader->unloadBots();
65 if(function_exists("pcntl_signal_dispatch"))
66 pcntl_signal_dispatch();