diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-30 16:12:18 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-30 16:12:18 +0000 |
commit | f62207f8d397f95e3151e463d069e534a3b304b4 (patch) | |
tree | 22a6a8d39cbafafaec742cfc18d29824146cdfbf /src/core/ss_main.c | |
parent | 7f555f08e7991c5c6d10a1f1bbeda82fb5f429f3 (diff) |
Fix issue with ss_main where it doesn't recreate StatServ when it's unloaded and loaded at run-time.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1820 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/ss_main.c')
-rw-r--r-- | src/core/ss_main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/ss_main.c b/src/core/ss_main.c index 273a335f9..bfdb2e270 100644 --- a/src/core/ss_main.c +++ b/src/core/ss_main.c @@ -26,13 +26,18 @@ class SSMain : public Module SSMain(const std::string &modname, const std::string &creator) : Module(modname, creator) { Command *c; - EvtHook *hook; c = createCommand("HELP", do_help, NULL, -1, -1, -1, -1, -1); this->AddCommand(cmdTable, c, MOD_HEAD); - hook = createEventHook(EVENT_SERVER_CONNECT, statserv_create); - this->AddEventHook(hook); + if (servsock == -1) { + EvtHook *hook; + + hook = createEventHook(EVENT_SERVER_CONNECT, statserv_create); + this->AddEventHook(hook); + } + else + statserv_create(0, NULL); } ~SSMain() { |