summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/memoserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-11-24 21:22:32 -0500
committerAdam <Adam@anope.org>2012-11-24 21:22:32 -0500
commit0210cf2b171af3f5fd4842389e653dd909c716f8 (patch)
tree2334a5d17fdc7942ff6cdde893f24020ba5e4271 /modules/pseudoclients/memoserv.cpp
parentf0708340ef8919b3a4f9f90f22187d68b06048c0 (diff)
Make the actual clients into services too
Diffstat (limited to 'modules/pseudoclients/memoserv.cpp')
-rw-r--r--modules/pseudoclients/memoserv.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp
index ee9c127f9..ff8d11602 100644
--- a/modules/pseudoclients/memoserv.cpp
+++ b/modules/pseudoclients/memoserv.cpp
@@ -165,12 +165,19 @@ class MemoServCore : public Module
{
this->SetAuthor("Anope");
- MemoServ = BotInfo::Find(Config->MemoServ);
- if (!MemoServ)
+ BotInfo *bi = BotInfo::Find(Config->MemoServ);
+ if (!bi)
throw ModuleException("No bot named " + Config->MemoServ);
Implementation i[] = { I_OnNickIdentify, I_OnJoinChannel, I_OnUserAway, I_OnNickUpdate, I_OnPreHelp, I_OnPostHelp };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
+
+ Service::AddAlias("BotInfo", "MemoServ", bi->nick);
+ }
+
+ ~MemoServCore()
+ {
+ Service::DelAlias("BotInfo", "MemoServ");
}
void OnNickIdentify(User *u) anope_override