summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/botserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-18 14:26:18 -0400
committerAdam <Adam@anope.org>2013-05-18 14:26:18 -0400
commit14dc142a9260f6f7f42864df0db18f266466af61 (patch)
tree0303da16f44abb86d13f582ea3d924021f86681f /modules/pseudoclients/botserv.cpp
parent51b7d53108a01fcd0854fe9d602fee330339d4d3 (diff)
Add botserv bot usermode config option
Diffstat (limited to 'modules/pseudoclients/botserv.cpp')
-rw-r--r--modules/pseudoclients/botserv.cpp8
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)