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/operserv.cpp | |
parent | f0708340ef8919b3a4f9f90f22187d68b06048c0 (diff) |
Make the actual clients into services too
Diffstat (limited to 'modules/pseudoclients/operserv.cpp')
-rw-r--r-- | modules/pseudoclients/operserv.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp index 8ee8c211b..5b61c3df9 100644 --- a/modules/pseudoclients/operserv.cpp +++ b/modules/pseudoclients/operserv.cpp @@ -175,8 +175,8 @@ class OperServCore : public Module { this->SetAuthor("Anope"); - OperServ = BotInfo::Find(Config->OperServ); - if (!OperServ) + BotInfo *bi = BotInfo::Find(Config->OperServ); + if (!bi) throw ModuleException("No bot named " + Config->OperServ); Implementation i[] = { I_OnBotPrivmsg, I_OnServerQuit, I_OnUserModeSet, I_OnUserModeUnset, I_OnUserConnect, I_OnUserNickChange, I_OnPreHelp }; @@ -186,10 +186,14 @@ class OperServCore : public Module XLineManager::RegisterXLineManager(&sglines); XLineManager::RegisterXLineManager(&sqlines); XLineManager::RegisterXLineManager(&snlines); + + Service::AddAlias("BotInfo", "OperServ", bi->nick); } ~OperServCore() { + Service::DelAlias("BotInfo", "OperServ"); + this->sglines.Clear(); this->sqlines.Clear(); this->snlines.Clear(); |