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

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

Log message:

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

Narf! Commited more than I wanted to last commit, and this is my punishment,
having to fix my half completed bugs :)

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.125.2.10 ircu2.10/ChangeLog:1.290.2.125.2.11
--- ircu2.10/ChangeLog:1.290.2.125.2.10 Fri Nov 22 21:50:33 2002
+++ ircu2.10/ChangeLog  Fri Nov 22 21:56:49 2002
@@ -1,3 +1,7 @@
+2002-11-23  Perry Lorier <[EMAIL PROTECTED]>
+       * ircd/m_nick.c: Minor cleanups and fixing some stuff I accidently
+       commited before
+
 2002-11-19  Perry Lorier <[EMAIL PROTECTED]>
        * ircd/m_join.c: Fix the inevitable typo
 
Index: ircu2.10/ircd/m_nick.c
diff -u ircu2.10/ircd/m_nick.c:1.17.2.1.8.1 ircu2.10/ircd/m_nick.c:1.17.2.1.8.2
--- ircu2.10/ircd/m_nick.c:1.17.2.1.8.1 Fri Nov 22 21:50:33 2002
+++ ircu2.10/ircd/m_nick.c      Fri Nov 22 21:56: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.1 2002/11/23 05:50:33 isomer Exp $
+ * $Id: m_nick.c,v 1.17.2.1.8.2 2002/11/23 05:56:50 isomer Exp $
  */
 
 /*
@@ -242,6 +242,10 @@
    *
    * XXX - hmmm can this happen after one is registered?
    *
+   * Yes, client 1 connects to IRC and registers, client 2 connects and
+   * sends "NICK foo" but doesn't send anything more.  client 1 now does
+   * /nick foo, they should succeed and client 2 gets disconnected with
+   * the message below.
    */
   if (IsUnknown(acptr) && MyConnect(acptr)) {
     ++ServerStats->is_ref;
@@ -320,8 +324,8 @@
     sendto_opmask_butone(0, SNO_OLDSNO, "Bad Nick: %s From: %s %C", parv[1],
                         parv[0], cptr);
     sendcmdto_one(&me, CMD_KILL, cptr, "%s :%s (%s <- %s[%s])",
-                 IsServer(sptr) ? parv[parc - 2] : parv[0], cli_name(&me), parv[1],
-                 nick, cli_name(cptr));
+                 IsServer(sptr) ? parv[parc - 2] : parv[0], 
+                 cli_name(&me), parv[1], nick, cli_name(cptr));
     if (!IsServer(sptr)) {
       /*
        * bad nick _change_
@@ -343,7 +347,7 @@
    * constructed). -avalon
    */
    
-  assert(NULL = strchr(nick,'.'));
+  assert(NULL == strchr(nick,'.'));
 
   acptr = FindClient(nick);
   if (!acptr) {
@@ -361,12 +365,7 @@
    * nickname or somesuch)
    */
   if (acptr == sptr) {
-    if (strcmp(cli_name(acptr), nick) != 0)
-      /*
-       * Allows change of case in his/her nick
-       */
-      return set_nick_name(cptr, sptr, nick, parc, parv);
-    else
+    if (strcmp(cli_name(acptr), nick) == 0)
       /*
        * This is just ':old NICK old' type thing.
        * Just forget the whole thing here. There is
@@ -375,6 +374,11 @@
        * version would treat it as nick collision.
        */
       return 0;                        /* NICK Message ignored */
+    else
+      /*
+       * Allows change of case in his/her nick
+       */
+      return set_nick_name(cptr, sptr, nick, parc, parv);
   }
 
   /*
----------------------- End of diff -----------------------

Reply via email to