X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_muteban.cpp;h=2c8a123f10901c336393ebd549cb4d99e5348d24;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=6e3ca525fe19b1bb03d57e26f5dc2043b4a4333c;hpb=6d03943426dcce76ba66567a9b18425a5ebb4c0c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp index 6e3ca525f..2c8a123f1 100644 --- a/src/modules/m_muteban.cpp +++ b/src/modules/m_muteban.cpp @@ -1,36 +1,39 @@ -/* +------------------------------------+ - * | 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) 2009 Daniel De Graaf + * Copyright (C) 2008 Robin Burchell * - * 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: Implements extban +b m: - mute bans */ class ModuleQuietBan : public Module { - private: public: - ModuleQuietBan() { - Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, 3); - } - - virtual ~ModuleQuietBan() + void init() { + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric }; + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual Version GetVersion() { - return Version("Implements extban +b m: - mute bans",VF_COMMON|VF_VENDOR,API_VERSION); + return Version("Implements extban +b m: - mute bans",VF_OPTCOMMON|VF_VENDOR); } virtual ModResult OnUserPreMessage(User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) @@ -53,12 +56,10 @@ class ModuleQuietBan : public Module return OnUserPreMessage(user, dest, target_type, text, status, exempt_list); } - virtual void On005Numeric(std::string &output) + virtual void On005Numeric(std::map& tokens) { - ServerInstance->AddExtBanChar('m'); + tokens["EXTBAN"].push_back('m'); } }; - MODULE_INIT(ModuleQuietBan) -