]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alias.cpp
Replace hardcoded mode letters, part 3
[user/henk/code/inspircd.git] / src / modules / m_alias.cpp
index 507a935339bd21d7fc0461634ea7df2c28fe5ed4..73e3bfd46e682b98dba17006cc74077df42a26ce 100644 (file)
@@ -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;
                }