]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nopartmsg.cpp
Use Utils->ServerUser instead of ServerInstance->FakeClient in m_spanningtree
[user/henk/code/inspircd.git] / src / modules / m_nopartmsg.cpp
index 648626a2392929ca808814df0305e834e90f71a2..50a6e14b9bc68097dabdf6caa62775bc12c92148 100644 (file)
@@ -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.
@@ -31,29 +31,24 @@ class ModulePartMsgBan : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1,2,0,0,VF_VENDOR,API_VERSION);
+               return Version("$Id$", VF_COMMON|VF_VENDOR, API_VERSION);
        }
 
 
-    virtual void OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent)
+       virtual void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent)
        {
                if (!IS_LOCAL(user))
                        return;
 
-#if 0
-               if (channel->IsExtBanned(user, 'p'))
+               if (channel->GetExtBanStatus(user, 'p') < 0)
                        partmessage = "";
-#endif
 
                return;
        }
 
        virtual void On005Numeric(std::string &output)
        {
-               if (output.find(" EXTBAN=:") == std::string::npos)
-                       output.append(" EXTBAN=:p");
-               else
-                       output.insert(output.find(" EXTBAN=:") + 9, "p");
+               ServerInstance->AddExtBanChar('p');
        }
 };