1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 05:23:14 +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
+8 -2
View File
@@ -20,14 +20,20 @@ class BotServCore : public Module
{
this->SetAuthor("Anope");
BotServ = BotInfo::Find(Config->BotServ);
if (!BotServ)
BotInfo *bi = BotInfo::Find(Config->BotServ);
if (!bi)
throw ModuleException("No bot named " + Config->BotServ);
Implementation i[] = { I_OnPrivmsg, I_OnJoinChannel, I_OnLeaveChannel,
I_OnPreHelp, I_OnPostHelp, I_OnChannelModeSet };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
Service::AddAlias("BotInfo", "BotServ", bi->nick);
}
~BotServCore()
{
Service::DelAlias("BotInfo", "BotServ");
}
void OnPrivmsg(User *u, Channel *c, Anope::string &msg) anope_override