X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_noctcp.cpp;h=0b4e39764151486e9b12d9a1318cd2abd5689a66;hb=9539fa9d7bcb19100bd5b7f67d6f792e48fff909;hp=b9f5d581b62a7377ca8d26061c44d1875da1d85c;hpb=9336468f5bfa60318cb57db5126047147b7a21cb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index b9f5d581b..0b4e39764 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -1,16 +1,24 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2007-2008 Robin Burchell + * Copyright (C) 2007 Dennis Friis + * Copyright (C) 2004, 2006 Craig Edwards * - * This program is free but copyrighted software; see - * the file COPYING for details. + * 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 + * License as published by the Free Software Foundation, version 2. * - * --------------------------------------------------- + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + #include "inspircd.h" /* $ModDesc: Provides support for unreal-style channel mode +C */ @@ -18,7 +26,7 @@ class NoCTCP : public ModeHandler { public: - NoCTCP(Module* Creator) : ModeHandler(Creator, 'C', PARAM_NONE, MODETYPE_CHANNEL) { } + NoCTCP(Module* Creator) : ModeHandler(Creator, "noctcp", 'C', PARAM_NONE, MODETYPE_CHANNEL) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { @@ -65,7 +73,7 @@ class ModuleNoCTCP : public Module virtual Version GetVersion() { - return Version("Provides support for unreal-style channel mode +C", VF_COMMON | VF_VENDOR, API_VERSION); + return Version("Provides support for unreal-style channel mode +C", VF_VENDOR); } virtual ModResult OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) @@ -78,11 +86,10 @@ class ModuleNoCTCP : public Module if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user))) { Channel* c = (Channel*)dest; + ModResult res = ServerInstance->OnCheckExemption(user,c,"noctcp"); - if (CHANOPS_EXEMPT('C') && c->GetPrefixValue(user) == OP_VALUE) - { + if (res == MOD_RES_ALLOW) return MOD_RES_PASSTHRU; - } if (!c->GetExtBanStatus(user, 'C').check(!c->IsModeSet('C'))) {