-$uplink->setUplinkHost("localhost", 4402);
-$uplink->setUplinkServer(5, "php.local.TestNet", "very_weak_password", "Test Server");
+require_once("config.inc.php");
+
+$uplink->setEventHandler(ModCMD::getEventHandler());
+
+$uplink->initialize();
+
+$botloader = new BotLoader($uplink);
+$botloader->loadBots();
+BotLoader::load("ModManager", "ModManager.class.php");
+
+function shutdown($signal = 0) {
+ global $botloader;
+ global $uplink;
+ echo "\n\nrecived shutdown instruction...\n";
+ $botloader->unloadBots();
+ $botloader->save();
+ $uplink->shutdown();
+ exit;
+}