summaryrefslogtreecommitdiff
path: root/src/modules/m_alias.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_alias.cpp')
-rw-r--r--src/modules/m_alias.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 507a93533..73e3bfd46 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -67,6 +67,7 @@ class ModuleAlias : public Module
/* whether or not +B users are allowed to use fantasy commands */
bool AllowBots;
+ UserModeReference botmode;
void ReadAliases()
{
@@ -96,6 +97,11 @@ class ModuleAlias : public Module
}
public:
+ ModuleAlias()
+ : botmode(this, "bot")
+ {
+ }
+
void init() CXX11_OVERRIDE
{
ReadAliases();
@@ -187,7 +193,7 @@ class ModuleAlias : public Module
}
/* Stop here if the user is +B and allowbot is set to no. */
- if (!AllowBots && user->IsModeSet('B'))
+ if (!AllowBots && user->IsModeSet(botmode))
{
return;
}