]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockcaps.cpp
Replace hardcoded mode letters, part 3
[user/henk/code/inspircd.git] / src / modules / m_blockcaps.cpp
index 0e1fa945ffecfdd5ef391d71b6a431d592fc1692..0eab385883768c6c67c534cf2c2da1582d360ccc 100644 (file)
@@ -22,8 +22,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support to block all-CAPS channel messages and notices */
-
 
 /** Handles the +B channel mode
  */
@@ -76,7 +74,7 @@ public:
                        if (res == MOD_RES_ALLOW)
                                return MOD_RES_PASSTHRU;
 
-                       if (!c->GetExtBanStatus(user, 'B').check(!c->IsModeSet('B')))
+                       if (!c->GetExtBanStatus(user, 'B').check(!c->IsModeSet(bc)))
                        {
                                int caps = 0;
                                const char* actstr = "\1ACTION ";
@@ -119,7 +117,7 @@ public:
                        ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "<blockcaps:percent> out of range, setting to default of 100.");
                        percent = 100;
                }
-               if (minlen < 1 || minlen > MAXBUF-1)
+               if (minlen < 1 || minlen > ServerInstance->Config->Limits.MaxLine)
                {
                        ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "<blockcaps:minlen> out of range, setting to default of 1.");
                        minlen = 1;