aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_alias.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-06-18 19:10:07 +0200
committerGravatar attilamolnar2013-07-19 19:40:04 +0200
commitfd1d19d6345943ecdb5ce4ef947f9b3c5c8bca86 (patch)
tree20ce1866b482808a85b34c7c09e53c3159617bc0 /src/modules/m_alias.cpp
parentMove SetNoticeMask(), FormatNoticeMasks() and ProcessNoticeMasks() from the U... (diff)
Replace hardcoded mode letters, part 3
This changes most remaining User::IsModeSet() calls to use ModeReferences for modes that were created by other modules or the core
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;
}