]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delayjoin.cpp
Maxpara on these was 3, should be 2
[user/henk/code/inspircd.git] / src / modules / m_delayjoin.cpp
index 23e6317ad8425f92cc3c732bcbd7d90b2f2d0168..4a250ba813e8acb1933bc1bbf55edb9e6a47ca2d 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -36,8 +36,8 @@ class ModuleDelayJoin : public Module
                djm = new DelayJoinMode(ServerInstance, this);
                if (!ServerInstance->Modes->AddMode(djm))
                        throw ModuleException("Could not add new modes!");
-               Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnNamesListItem, I_OnText };
-               ServerInstance->Modules->Attach(eventlist, this, 6);
+               Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnNamesListItem, I_OnText, I_OnHostCycle };
+               ServerInstance->Modules->Attach(eventlist, this, 7);
        }
        virtual ~ModuleDelayJoin();
        virtual Version GetVersion();
@@ -103,6 +103,10 @@ void ModuleDelayJoin::OnNamesListItem(User* issuer, User* user, Channel* channel
        if (nick.empty())
                return;
 
+       /* don't prevent the user from seeing themself */
+       if (issuer == user)
+               return;
+
        /* If the user is hidden by delayed join, hide them from the NAMES list */
        std::string key("delayjoin_");
        key.append(channel->name);