]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_silence_ext.cpp
To be more specific, specify rpath() macro here
[user/henk/code/inspircd.git] / src / modules / m_silence_ext.cpp
index 168dab78866a039ebee377bd9cac3280f91bb13b..122016dbcbdd00765aceb115bc6422df2ded3e91 100644 (file)
@@ -2,20 +2,15 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * 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 <stdio.h>
 #include <string>
 #include <vector>
@@ -219,7 +214,7 @@ class cmd_silence : public command_t
        /* turn the mask into a nice human readable format */
        std::string DecompPattern (const int pattern)
        {
-               std::string out = "";
+               std::string out;
                if ((pattern & SILENCE_PRIVATE) > 0)
                        out += ",privatemessages";
                if ((pattern & SILENCE_CHANNEL) > 0)
@@ -310,6 +305,9 @@ class ModuleSilence : public Module
 
        virtual int PreText(userrec* 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)
                {
                        return MatchPattern((userrec*)dest, user, silence_type);