X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_operchans.cpp;h=9e30ceca2a95dc6a9b72a38ff7dc696728bedb5f;hb=7b1ab06a9551d8db141ebc9213836af6b5369284;hp=783ea9149e54e41c566ba41f8beb991ffa3c3b10;hpb=aa692dc1039b63deef7886e914ec499abe7facaf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 783ea9149..9e30ceca2 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -7,7 +7,7 @@ * Copyright (C) 2009-2010 Daniel De Graaf * Copyright (C) 2009 Uli Schlachter * Copyright (C) 2007 Dennis Friis - * Copyright (C) 2006, 2010 Craig Edwards + * Copyright (C) 2004, 2006, 2010 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -66,15 +66,10 @@ class ModuleOperChans : public Module if (!user->IsOper()) return MOD_RES_PASSTHRU; - // Check whether the oper's type matches the ban. - const std::string submask = mask.substr(2); - if (InspIRCd::Match(user->oper->name, submask)) - return MOD_RES_DENY; - - // If the oper's type contains spaces recheck with underscores. + // Replace spaces with underscores as they're prohibited in mode parameters. std::string opername(user->oper->name); stdalgo::string::replace_all(opername, space, underscore); - if (InspIRCd::Match(opername, submask)) + if (InspIRCd::Match(opername, mask.substr(2))) return MOD_RES_DENY; return MOD_RES_PASSTHRU; @@ -87,7 +82,7 @@ class ModuleOperChans : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Provides support for oper-only channels via channel mode +O and extban 'O'", VF_VENDOR); + return Version("Adds channel mode O (operonly) which prevents non-server operators from joining the channel.", VF_VENDOR); } };