]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nopartmsg.cpp
Fix double dot in half-cloaked resolved hosts
[user/henk/code/inspircd.git] / src / modules / m_nopartmsg.cpp
index 1576fdc01e7114d56ae7e9f90f139f2b9d0e56cf..27015914733ad44d4a59740500081b6e6120cc55 100644 (file)
@@ -3,7 +3,7 @@
  *       +------------------------------------+
  *
  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -19,8 +19,7 @@ class ModulePartMsgBan : public Module
 {
  private:
  public:
-       ModulePartMsgBan(InspIRCd* Me) : Module(Me)
-       {
+       ModulePartMsgBan()      {
                Implementation eventlist[] = { I_OnUserPart, I_On005Numeric };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
@@ -31,16 +30,16 @@ class ModulePartMsgBan : public Module
 
        virtual Version GetVersion()
        {
-               return Version("$Id$", VF_VENDOR, API_VERSION);
+               return Version("Implements extban +b p: - part message bans", VF_COMMON|VF_VENDOR, API_VERSION);
        }
 
 
-       virtual void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent)
+       virtual void OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts)
        {
-               if (!IS_LOCAL(user))
+               if (!IS_LOCAL(memb->user))
                        return;
 
-               if (channel->IsExtBanned(user, 'p'))
+               if (memb->chan->GetExtBanStatus(memb->user, 'p') == MOD_RES_DENY)
                        partmessage = "";
 
                return;