X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_deaf.cpp;h=0a002bd07716633e2ae84b3dbef2324d79cfafa4;hb=808a0a09577009c2d6e494979c2189426b332aef;hp=2d13be98baa39ab06e4fec4b72850f2cd6ef2b44;hpb=085a8bc6605d3d07bfe5137423c4a7a02978cd88;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index 2d13be98b..0a002bd07 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.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) 2006, 2008 Craig Edwards + * Copyright (C) 2007 Robin Burchell + * Copyright (C) 2006-2007 Dennis Friis * - * 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 ircu style usermode +d (deaf to channel messages and channel notices) */ @@ -20,7 +28,7 @@ class User_d : public ModeHandler { public: - User_d(Module* Creator) : ModeHandler(Creator, 'd', PARAM_NONE, MODETYPE_USER) { } + User_d(Module* Creator) : ModeHandler(Creator, "deaf", 'd', PARAM_NONE, MODETYPE_USER) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { @@ -67,11 +75,9 @@ class ModuleDeaf : public Module virtual void OnRehash(User* user) { - ConfigReader* conf = new ConfigReader; - deaf_bypasschars = conf->ReadValue("deaf", "bypasschars", 0); - deaf_bypasschars_uline = conf->ReadValue("deaf", "bypasscharsuline", 0); - - delete conf; + ConfigReader conf; + deaf_bypasschars = conf.ReadValue("deaf", "bypasschars", 0); + deaf_bypasschars_uline = conf.ReadValue("deaf", "bypasscharsuline", 0); } virtual ModResult OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) @@ -157,7 +163,7 @@ class ModuleDeaf : public Module virtual Version GetVersion() { - return Version("Provides support for ircu style usermode +d (deaf to channel messages and channel notices)", VF_COMMON|VF_VENDOR,API_VERSION); + return Version("Provides support for ircu style usermode +d (deaf to channel messages and channel notices)", VF_VENDOR); } };