summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alias.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 160e3cea3..4ba05729b 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -60,9 +60,14 @@ class ModuleAlias : public Module
*/
std::multimap<std::string, Alias> Aliases;
+ /* whether or not +B users are allowed to use fantasy commands */
+ bool AllowBots;
+
virtual void ReadAliases()
{
ConfigReader MyConf(ServerInstance);
+
+ AllowBots = MyConf.ReadFlag("fantasy", "allowbots", "no", 0);
std::string fpre = MyConf.ReadValue("fantasy","prefix",0);
fprefix = fpre.empty() ? '!' : fpre[0];
@@ -187,6 +192,13 @@ class ModuleAlias : public Module
return 0;
}
+ /* Stop here if the user is +B and allowbot is set to no. */
+ if (!AllowBots && user->IsModeSet('B'))
+ {
+ ServerInstance->Logs->Log("FANTASY", DEBUG, "fantasy: user is +B and allowbot is set to no");
+ return 0;
+ }
+
Channel *c = (Channel *)dest;
std::string fcommand;