From fd1d19d6345943ecdb5ce4ef947f9b3c5c8bca86 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Tue, 18 Jun 2013 19:10:07 +0200 Subject: 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 --- src/modules/m_alias.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/modules/m_alias.cpp') 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; } -- cgit v1.3.1-10-gc9f91