X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_silence.cpp;h=9b5f393e57b838cf99a32b1a8c41c9145b9f5fd3;hb=819147178db00008a215670992d0f532dd57f9e5;hp=eae8675a8509215cc0bf70994621fa72bbb9df42;hpb=a1a7b96a8c994eb09a3d071f3daf28252b8c188b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index eae8675a8..9b5f393e5 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -91,7 +91,7 @@ class CommandSilence : public Command public: CommandSilence (InspIRCd* Instance, unsigned int &max) : Command(Instance,"SILENCE", 0, 0), maxsilence(max) { - this->source = "m_silence_ext.so"; + this->source = "m_silence.so"; syntax = "{[+|-] }"; TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } @@ -274,7 +274,7 @@ class ModuleSilence : public Module ModuleSilence(InspIRCd* Me) : Module(Me), maxsilence(32) { - OnRehash(NULL, ""); + OnRehash(NULL); cmdsilence = new CommandSilence(ServerInstance,maxsilence); cmdsvssilence = new CommandSVSSilence(ServerInstance); ServerInstance->AddCommand(cmdsilence); @@ -284,7 +284,7 @@ class ModuleSilence : public Module ServerInstance->Modules->Attach(eventlist, this, 7); } - virtual void OnRehash(User* user, const std::string ¶meter) + virtual void OnRehash(User* user) { ConfigReader Conf(ServerInstance); maxsilence = Conf.ReadInteger("silence", "maxentries", 0, true); @@ -345,10 +345,7 @@ class ModuleSilence : public Module virtual int PreText(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list, int silence_type) { - if (!IS_LOCAL(user)) - return 0; - - if (target_type == TYPE_USER) + if (target_type == TYPE_USER && IS_LOCAL(((User*)dest))) { return MatchPattern((User*)dest, user, silence_type); } @@ -403,7 +400,7 @@ class ModuleSilence : public Module virtual Version GetVersion() { - return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION); + return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION); } };