CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_11_03
Commit time: 2002-11-23 11:11:00 UTC

Modified files:
  Tag: u2_10_11_03
     ChangeLog ircd/m_nick.c

Log message:

Author: Isomer <[EMAIL PROTECTED]>
Log message:

Somehow ms_nick() gained a return in the middle of it.  This meant that when
two nicks had the same TS it would only KILL one of them, not both.

This should make the mysterious "Protocol violation: %s is trying to login
as %s again but is already logged in as %s" messages go away.

This should stop clients being able to inadvertantly desync channels.

This should also bring about world peace, and solve world hunger.

I'm tempted to rewrite m_nick.c from scratch, it's nasty, but I fear I'm
going to introduce more bugs than I'm going to fix.  Sigh.  Perhaps for .12

I'm also circumventing my "Don't commit after 10pm" rule by waiting until
after midnight.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.125.2.11 ircu2.10/ChangeLog:1.290.2.125.2.12
--- ircu2.10/ChangeLog:1.290.2.125.2.11 Fri Nov 22 21:56:49 2002
+++ ircu2.10/ChangeLog  Sat Nov 23 03:10:50 2002
@@ -1,4 +1,10 @@
 2002-11-23  Perry Lorier <[EMAIL PROTECTED]>
+       * ircd/m_nick.c: ms_nick had mysteriously gained a "return" in the
+       middle of it.  This meant when two people had the same TS on a nick
+       collide it was only killing one of them.  Thus we have phantom clients
+       on the network, which desync channels and cause protocol violations...
+
+2002-11-23  Perry Lorier <[EMAIL PROTECTED]>
        * ircd/m_nick.c: Minor cleanups and fixing some stuff I accidently
        commited before
 
Index: ircu2.10/ircd/m_nick.c
diff -u ircu2.10/ircd/m_nick.c:1.17.2.1.8.2 ircu2.10/ircd/m_nick.c:1.17.2.1.8.3
--- ircu2.10/ircd/m_nick.c:1.17.2.1.8.2 Fri Nov 22 21:56:50 2002
+++ ircu2.10/ircd/m_nick.c      Sat Nov 23 03:10:50 2002
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_nick.c,v 1.17.2.1.8.2 2002/11/23 05:56:50 isomer Exp $
+ * $Id: m_nick.c,v 1.17.2.1.8.3 2002/11/23 11:10:50 isomer Exp $
  */
 
 /*
@@ -416,6 +416,8 @@
    * --Run
    *
    */
+
+
   if (IsServer(sptr)) {
     /*
      * A new NICK being introduced by a neighbouring
@@ -462,11 +464,16 @@
 
         cli_flags(sptr) |= FLAGS_KILLED;
 
-       return exit_client_msg(cptr, sptr, &me,
+       exit_client_msg(cptr, sptr, &me,
                               "Killed (%s (Nick collision))",
                               feature_str(FEAT_HIS_SERVERNAME));
 
+       sptr = 0; /* Make sure we don't use the dead client */
+
       }
+      /* If the two have the same TS then we want to kill both sides, so
+       * don't leave yet!
+       */
       if (lastnick != cli_lastnick(acptr))
         return 0;                /* Ignore the NICK */
     }
----------------------- End of diff -----------------------

Reply via email to