diff options
author | Adam <Adam@anope.org> | 2012-11-24 21:22:32 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-11-24 21:22:32 -0500 |
commit | 0210cf2b171af3f5fd4842389e653dd909c716f8 (patch) | |
tree | 2334a5d17fdc7942ff6cdde893f24020ba5e4271 /modules/pseudoclients/hostserv.cpp | |
parent | f0708340ef8919b3a4f9f90f22187d68b06048c0 (diff) |
Make the actual clients into services too
Diffstat (limited to 'modules/pseudoclients/hostserv.cpp')
-rw-r--r-- | modules/pseudoclients/hostserv.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index 47c4250c0..6f101720b 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -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 |