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:
+13
-14
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user