diff options
author | Adam <Adam@anope.org> | 2013-05-18 14:26:18 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-18 14:26:18 -0400 |
commit | 14dc142a9260f6f7f42864df0db18f266466af61 (patch) | |
tree | 0303da16f44abb86d13f582ea3d924021f86681f /modules/pseudoclients/botserv.cpp | |
parent | 51b7d53108a01fcd0854fe9d602fee330339d4d3 (diff) |
Add botserv bot usermode config option
Diffstat (limited to 'modules/pseudoclients/botserv.cpp')
-rw-r--r-- | modules/pseudoclients/botserv.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index 223a9787c..5a84d1e7f 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -19,7 +19,7 @@ class BotServCore : public Module BotServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) { Implementation i[] = { I_OnReload, I_OnSetCorrectModes, I_OnBotAssign, I_OnBotDelete, I_OnPrivmsg, I_OnJoinChannel, I_OnLeaveChannel, - I_OnPreHelp, I_OnPostHelp, I_OnChannelModeSet, I_OnCreateChan, I_OnUserKicked }; + I_OnPreHelp, I_OnPostHelp, I_OnChannelModeSet, I_OnCreateChan, I_OnUserKicked, I_OnCreateBot }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } @@ -347,6 +347,12 @@ class BotServCore : public Module /* Bots get rejoined */ bi->Join(channel, &status); } + + void OnCreateBot(BotInfo *bi) anope_override + { + if (bi->botmodes.empty()) + bi->botmodes = Config->GetModule(this)->Get<const Anope::string>("botumodes"); + } }; MODULE_INIT(BotServCore) |