]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_channelban.cpp
Update copyright headers.
[user/henk/code/inspircd.git] / src / modules / m_channelban.cpp
index 189c0d0bcd895e4199e05ecb42a19d4bd6d32261..c8097d2da92a7a20d2e01ca03a685fca665c7851 100644 (file)
@@ -1,6 +1,11 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2013, 2021 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2012, 2014-2016 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2010 Craig Edwards <brain@inspircd.org>
+ *   Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
  *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
  *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
  *
@@ -25,7 +30,7 @@ class ModuleBadChannelExtban : public Module
  public:
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Extban 'j' - channel status/join ban", VF_OPTCOMMON|VF_VENDOR);
+               return Version("Adds extended ban j: which checks whether users are in a channel matching the specified glob pattern.", VF_OPTCOMMON|VF_VENDOR);
        }
 
        ModResult OnCheckBan(User *user, Channel *c, const std::string& mask) CXX11_OVERRIDE
@@ -34,7 +39,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 +49,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;
                                }
                        }