From f62207f8d397f95e3151e463d069e534a3b304b4 Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Sun, 30 Nov 2008 16:12:18 +0000 Subject: [PATCH] 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 --- src/core/ss_main.c | 11 ++++++++--- 1 file 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() {