]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_channelban.cpp
Some more text fixes and improvements (#1618).
[user/henk/code/inspircd.git] / src / modules / m_channelban.cpp
index 189c0d0bcd895e4199e05ecb42a19d4bd6d32261..c34e0a6c5469df27becb2736c061bda96c7717c3 100644 (file)
@@ -25,7 +25,7 @@ class ModuleBadChannelExtban : public Module
  public:
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Extban 'j' - channel status/join ban", VF_OPTCOMMON|VF_VENDOR);
+               return Version("Provides extban 'j', ban users that are present in another channel, and optionally on their status there", VF_OPTCOMMON|VF_VENDOR);
        }
 
        ModResult OnCheckBan(User *user, Channel *c, const std::string& mask) CXX11_OVERRIDE
@@ -34,7 +34,7 @@ class ModuleBadChannelExtban : public Module
                {
                        std::string rm(mask, 2);
                        char status = 0;
-                       ModeHandler* mh = ServerInstance->Modes->FindPrefix(rm[0]);
+                       const PrefixMode* const mh = ServerInstance->Modes->FindPrefix(rm[0]);
                        if (mh)
                        {
                                rm.assign(mask, 3, std::string::npos);
@@ -44,7 +44,7 @@ class ModuleBadChannelExtban : public Module
                        {
                                if (InspIRCd::Match((*i)->chan->name, rm))
                                {
-                                       if (!status || (*i)->hasMode(status))
+                                       if ((!status) || ((*i)->HasMode(mh)))
                                                return MOD_RES_DENY;
                                }
                        }