X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_restrictmsg.cpp;h=4f611653bb62d4b8e8ff5de0d4fc02dcab263866;hb=7f00015727fab50e37de46aa90d218b31c852c87;hp=8e10e2457af94254d59359e8d619aaef4f8ab9f5;hpb=6050df73f498d05597fb37c6157868df1f6f4db2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp index 8e10e2457..4f611653b 100644 --- a/src/modules/m_restrictmsg.cpp +++ b/src/modules/m_restrictmsg.cpp @@ -2,20 +2,15 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. - * E-mail: - * - * - * - * Written by Craig Edwards, Craig McLure, and others. + * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * * This program is free but copyrighted software; see * the file COPYING for details. * * --------------------------------------------------- */ -using namespace std; - #include #include #include @@ -44,9 +39,9 @@ class ModuleRestrictMsg : public Module List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; } - virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) + virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) { - if (target_type == TYPE_USER) + if ((target_type == TYPE_USER) && (IS_LOCAL(user))) { userrec* u = (userrec*)dest; if (*u->oper || *user->oper) @@ -65,9 +60,9 @@ class ModuleRestrictMsg : public Module return 0; } - virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status) + virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) { - return this->OnUserPreMessage(user,dest,target_type,text,status); + return this->OnUserPreMessage(user,dest,target_type,text,status,exempt_list); } virtual ~ModuleRestrictMsg() @@ -76,7 +71,7 @@ class ModuleRestrictMsg : public Module virtual Version GetVersion() { - return Version(1,0,0,1,VF_VENDOR); + return Version(1,1,0,1,VF_VENDOR,API_VERSION); } };