summaryrefslogtreecommitdiff
path: root/src/core/ss_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ss_main.c')
-rw-r--r--src/core/ss_main.c11
1 files changed, 11 insertions, 0 deletions
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)