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

Make the actual clients into services too

This commit is contained in:
Adam
2012-11-24 21:22:32 -05:00
parent f0708340ef
commit 0210cf2b17
16 changed files with 68 additions and 23 deletions
+9 -2
View File
@@ -23,12 +23,19 @@ class HostServCore : public Module
if (!IRCD || !IRCD->CanSetVHost)
throw ModuleException("Your IRCd does not support vhosts");
HostServ = BotInfo::Find(Config->HostServ);
if (!HostServ)
BotInfo *bi = BotInfo::Find(Config->HostServ);
if (!bi)
throw ModuleException("No bot named " + Config->HostServ);
Implementation i[] = { I_OnNickIdentify, I_OnNickUpdate, I_OnPreHelp };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
Service::AddAlias("BotInfo", "HostServ", bi->nick);
}
~HostServCore()
{
Service::DelAlias("BotInfo", "HostServ");
}
void OnNickIdentify(User *u) anope_override