1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 02:43:13 +02:00

Fix ss_main's client introduction.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2226 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rburchell
2009-03-31 14:43:04 +00:00
parent fdfc12f398
commit ab9c1e4651
3 changed files with 22 additions and 16 deletions
+13 -14
View File
@@ -47,12 +47,12 @@ class SSMain : public Module
if (servsock == -1)
{
// EvtHook *hook = createEventHook(EVENT_SERVER_CONNECT, statserv_create);
// this->AddEventHook(hook);
ModuleManager::Attach(I_OnServerConnect, this);
}
else
statserv_create(0, NULL);
}
~SSMain()
{
CommandHash *current;
@@ -71,18 +71,17 @@ class SSMain : public Module
delete statserv;
}
}
void OnServerConnect(const std::string &sname)
{
statserv = findbot("StatServ");
if (!statserv)
{
statserv = new BotInfo("StatServ", ServiceUser, ServiceHost, "Stats Service");
ircdproto->SendClientIntroduction("StatServ", ServiceUser, ServiceHost, "Stats Service", ircd->pseudoclient_mode, statserv->uid.c_str());
}
statserv->cmdTable = cmdTable;
}
};
int statserv_create(int argc, char **argv)
{
statserv = findbot("StatServ");
if (!statserv)
{
statserv = new BotInfo("StatServ", ServiceUser, ServiceHost, "Stats Service");
ircdproto->SendClientIntroduction("StatServ", ServiceUser, ServiceHost, "Stats Service", ircd->pseudoclient_mode, statserv->uid.c_str());
}
statserv->cmdTable = cmdTable;
return MOD_CONT;
}
MODULE_INIT("ss_main", SSMain)