From 2f93b4225f3b0f908170c6591cc083ee3d297348 Mon Sep 17 00:00:00 2001 From: Adam- Date: Mon, 7 Sep 2009 17:03:55 +0000 Subject: Added the OnBotPreLoad event to fix introducing StatServ git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2494 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/ss_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core') diff --git a/src/core/ss_main.c b/src/core/ss_main.c index 22d2edc1b..8dbea1271 100644 --- a/src/core/ss_main.c +++ b/src/core/ss_main.c @@ -42,6 +42,7 @@ class SSMain : public Module this->SetPermanent(true); this->AddCommand(cmdTable, new CommandSSHelp(), MOD_HEAD); + ModuleManager::Attach(I_OnBotPreLoad, this); statserv = findbot("StatServ"); if (!statserv) @@ -71,6 +72,16 @@ class SSMain : public Module delete statserv; } } + + void OnBotPreLoad(BotInfo *bi) + { + if (!strcmp(bi->nick, "StatServ")) + { + delete statserv; + statserv = bi; + statserv->cmdTable = cmdTable; + } + } }; MODULE_INIT("ss_main", SSMain) -- cgit