diff options
Diffstat (limited to 'modules/pseudoclients/chanserv.cpp')
| -rw-r--r-- | modules/pseudoclients/chanserv.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 7a5b482bb..6f5cda048 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -61,12 +61,19 @@ class ChanServCore : public Module { this->SetAuthor("Anope"); - ChanServ = BotInfo::Find(Config->ChanServ); - if (!ChanServ) + BotInfo *bi = BotInfo::Find(Config->ChanServ); + if (!bi) throw ModuleException("No bot named " + Config->ChanServ); Implementation i[] = { I_OnBotPrivmsg, I_OnDelCore, I_OnPreHelp, I_OnPostHelp, I_OnCheckModes }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); + + Service::AddAlias("BotInfo", "ChanServ", bi->nick); + } + + ~ChanServCore() + { + Service::DelAlias("BotInfo", "ChanServ"); } EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message) anope_override |
