+BotLoader::load("ModManager", "ModManager.class.php");
+
+function shutdown($signal) {
+ global $botloader;
+ global $uplink;
+ if($signal == SIGINT) $type="SIGINT";
+ else if($signal == SIGTERM) $type="SIGTERM";
+ else $type = $signal;
+ echo "\n\nrecived shutdown instruction... ".$type."\n";
+ $botloader->unloadBots();
+ $botloader->save();
+ $uplink->shutdown();
+ exit;
+}