Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_nick.c
index 02c61f3943d3f2b051729288406291f5be9dff2c..5990ba6d46a450adb16b59f25d1b329d04bfb618 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
@@ -125,10 +127,10 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   /*
    * parv[0] will be empty for clients connecting for the first time
    */
-  client_name = (*sptr->name) ? sptr->name : "*";
+  client_name = (*(cli_name(sptr))) ? cli_name(sptr) : "*";
 
   if (parc < 2) {
-    sendto_one(sptr, err_str(ERR_NONICKNAMEGIVEN), me.name, client_name);
+    send_reply(sptr, ERR_NONICKNAMEGIVEN);
     return 0;
   }
   /*
@@ -151,7 +153,7 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    * and KILL it. -avalon 4/4/92
    */
   if (0 == do_nick_name(nick)) {
-    sendto_one(sptr, err_str(ERR_ERRONEUSNICKNAME), me.name, client_name, arg);
+    send_reply(sptr, ERR_ERRONEUSNICKNAME, arg);
     return 0;
   }
 
@@ -160,7 +162,7 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    * nick, if so tell him that it's a nick in use...
    */
   if (isNickJuped(nick)) {
-    sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name, client_name, nick);
+    send_reply(sptr, ERR_NICKNAMEINUSE, nick);
     return 0;                        /* NICK message ignored */
   }
 
@@ -171,7 +173,7 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     return set_nick_name(cptr, sptr, nick, parc, parv);
   }
   if (IsServer(acptr)) {
-    sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name, client_name, nick);
+    send_reply(sptr, ERR_NICKNAMEINUSE, nick);
     return 0;                        /* NICK message ignored */
   }
   /*
@@ -187,7 +189,7 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
      * is concerned (user is changing the case of his/her
      * nickname or somesuch)
      */
-    if (0 != strcmp(acptr->name, nick)) {
+    if (0 != strcmp(cli_name(acptr), nick)) {
       /*
        * Allows change of case in his/her nick
        */
@@ -217,7 +219,7 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    */
   if (IsUnknown(acptr) && MyConnect(acptr)) {
     ++ServerStats->is_ref;
-    IPcheck_connect_fail(acptr->ip);
+    IPcheck_connect_fail(cli_ip(acptr));
     exit_client(cptr, acptr, &me, "Overridden by other sign on");
     return set_nick_name(cptr, sptr, nick, parc, parv);
   }
@@ -225,7 +227,7 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    * NICK is coming from local client connection. Just
    * send error reply and ignore the command.
    */
-  sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name, client_name, nick);
+  send_reply(sptr, ERR_NICKNAMEINUSE, nick);
   return 0;                        /* NICK message ignored */
 }
 
@@ -244,6 +246,7 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
  *   parv[4] = username
  *   parv[5] = hostname
  *   parv[6] = umode (optional)
+ *   parv[parc-4] = %<lastmod>:<mask>   <- Only if matching GLINE
  *   parv[parc-3] = IP#                 <- Only Protocol >= 10
  *   parv[parc-2] = YXX, numeric nick   <- Only Protocol >= 10
  *   parv[parc-1] = info
@@ -261,24 +264,23 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   assert(IsServer(cptr));
 
   if ((IsServer(sptr) && parc < 8) || parc < 3) {
-    sendto_ops("bad NICK param count for %s from %s", parv[1], cptr->name);
+    sendto_opmask_butone(0, SNO_OLDSNO, "bad NICK param count for %s from %C",
+                        parv[1], cptr);
     return need_more_params(sptr, "NICK");
   }
 
   ircd_strncpy(nick, parv[1], NICKLEN);
   nick[NICKLEN] = '\0';
 
-  if (!IsBurstOrBurstAck(sptr)) {
-     if (IsServer(sptr)) {
-       lastnick = atoi(parv[3]);
-       if (lastnick > OLDEST_TS) 
-         sptr->serv->lag = TStime() - lastnick;
-     }
-     else {
-       lastnick = atoi(parv[2]); 
-       if (lastnick > OLDEST_TS)
-         sptr->user->server->serv->lag = TStime() - lastnick;
-     }
+  if (IsServer(sptr)) {
+    lastnick = atoi(parv[3]);
+    if (lastnick > OLDEST_TS && !IsBurstOrBurstAck(sptr)) 
+      cli_serv(sptr)->lag = TStime() - lastnick;
+  }
+  else {
+    lastnick = atoi(parv[2]); 
+    if (lastnick > OLDEST_TS && !IsBurstOrBurstAck(sptr))
+      cli_serv(cli_user(sptr)->server)->lag = TStime() - lastnick;
   }
   /*
    * If do_nick_name() returns a null name OR if the server sent a nick
@@ -287,21 +289,23 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    * and KILL it. -avalon 4/4/92
    */
   if (0 == do_nick_name(nick) || 0 != strcmp(nick, parv[1])) {
-    sendto_one(sptr, err_str(ERR_ERRONEUSNICKNAME), me.name, parv[0], parv[1]);
+    send_reply(sptr, ERR_ERRONEUSNICKNAME, parv[1]);
 
     ++ServerStats->is_kill;
-    sendto_ops("Bad Nick: %s From: %s %s", parv[1], parv[0], cptr->name);
-    sendto_one(cptr, "%s " TOK_KILL " %s :%s (%s <- %s[%s])",
-               NumServ(&me), IsServer(sptr) ? parv[parc - 2] : parv[0], me.name,
-               parv[1], nick, cptr->name);
+    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));
     if (!IsServer(sptr)) {
       /*
        * bad nick _change_
        */
-      sendto_highprot_butone(cptr, 10, "%s " TOK_KILL " %s :%s (%s <- %s!%s@%s)",
-                             NumServ(&me), parv[0], me.name, cptr->name,
-                             parv[0], sptr->user ? sptr->username : "",
-                             sptr->user ? sptr->user->server->name : cptr->name);
+      sendcmdto_serv_butone(&me, CMD_KILL, 0, "%s :%s (%s <- %s!%s@%s)",
+                           parv[0], cli_name(&me), cli_name(cptr), parv[0],
+                           cli_user(sptr) ? cli_username(sptr) : "",
+                           cli_user(sptr) ? cli_name(cli_user(sptr)->server) :
+                           cli_name(cptr));
     }
     return 0;
   }
@@ -313,7 +317,9 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    * is present in the nicklist (due to the way the below for loop is
    * constructed). -avalon
    */
-  if (!(acptr = FindClient(nick))) {
+   
+  acptr = FindClient(nick);
+  if (!acptr) {
     /*
      * No collisions, all clear...
      */
@@ -329,14 +335,14 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
      * there is no danger of the server being disconnected.
      * Ultimate way to jupiter a nick ? >;-). -avalon
      */
-    sendto_ops("Nick collision on %s(%s <- %s)", sptr->name, acptr->from->name, cptr->name);
+    sendto_opmask_butone(0, SNO_OLDSNO, "Nick collision on %C(%C <- %C)", sptr,
+                        cli_from(acptr), cptr);
     ++ServerStats->is_kill;
 
-    sendto_one(cptr, "%s " TOK_KILL " %s%s :%s (%s <- %s)",
-               NumServ(&me), NumNick(sptr), me.name, acptr->from->name,
-               cptr->name);
+    sendcmdto_one(&me, CMD_KILL, cptr, "%C :%s (%s <- %s)", sptr, cli_name(&me),
+                 cli_name(cli_from(acptr)), cli_name(cptr));
 
-    sptr->flags |= FLAGS_KILLED;
+    cli_flags(sptr) |= FLAGS_KILLED;
     /*
      * if sptr is a server it is exited here, nothing else to do
      */
@@ -350,7 +356,7 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    * nickname or somesuch)
    */
   if (acptr == sptr) {
-    if (strcmp(acptr->name, nick) != 0)
+    if (strcmp(cli_name(acptr), nick) != 0)
       /*
        * Allows change of case in his/her nick
        */
@@ -379,7 +385,7 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    */
   if (IsUnknown(acptr) && MyConnect(acptr)) {
     ++ServerStats->is_ref;
-    IPcheck_connect_fail(acptr->ip);
+    IPcheck_connect_fail(cli_ip(acptr));
     exit_client(cptr, acptr, &me, "Overridden by other sign on");
     return set_nick_name(cptr, sptr, nick, parc, parv);
   }
@@ -408,11 +414,12 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
      *
      * compare IP address and username
      */
-    differ =  (acptr->ip.s_addr != htonl(base64toint(parv[parc - 3]))) ||
-              (0 != ircd_strcmp(acptr->user->username, parv[4]));
-    sendto_ops("Nick collision on %s (%s " TIME_T_FMT " <- %s " TIME_T_FMT
-               " (%s user@host))", acptr->name, acptr->from->name, acptr->lastnick,
-               cptr->name, lastnick, differ ? "Different" : "Same");
+    differ =  (cli_ip(acptr).s_addr != htonl(base64toint(parv[parc - 3]))) ||
+              (0 != ircd_strcmp(cli_user(acptr)->username, parv[4]));
+    sendto_opmask_butone(0, SNO_OLDSNO, "Nick collision on %C (%C %Tu <- "
+                        "%C %Tu (%s user@host))", acptr, cli_from(acptr),
+                        cli_lastnick(acptr), cptr, lastnick,
+                        differ ? "Different" : "Same");
   }
   else {
     /*
@@ -420,11 +427,11 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
      *
      * compare IP address and username
      */
-    differ =  (acptr->ip.s_addr != sptr->ip.s_addr) ||
-              (0 != ircd_strcmp(acptr->user->username, sptr->user->username));              
-    sendto_ops("Nick change collision from %s to %s (%s " TIME_T_FMT " <- %s "
-               TIME_T_FMT ")", sptr->name, acptr->name, acptr->from->name,
-               acptr->lastnick, cptr->name, lastnick);
+    differ =  (cli_ip(acptr).s_addr != cli_ip(sptr).s_addr) ||
+              (0 != ircd_strcmp(cli_user(acptr)->username, cli_user(sptr)->username));              
+    sendto_opmask_butone(0, SNO_OLDSNO, "Nick change collision from %C to "
+                        "%C (%C %Tu <- %C %Tu)", sptr, acptr, cli_from(acptr),
+                        cli_lastnick(acptr), cptr, lastnick);
   }
   /*
    * Now remove (kill) the nick on our side if it is the youngest.
@@ -435,24 +442,16 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    *
    * This exits the client sending the NICK message
    */
-  if (acptr->from != cptr) {
-    if ((differ && lastnick >= acptr->lastnick) || (!differ && lastnick <= acptr->lastnick)) {
+  if (cli_from(acptr) != cptr) {
+    if ((differ && lastnick >= cli_lastnick(acptr)) ||
+       (!differ && lastnick <= cli_lastnick(acptr))) {
       if (!IsServer(sptr)) {
         ++ServerStats->is_kill;
-        sendto_highprot_butone(cptr, 10,        /* Kill old from outgoing servers */
-                              "%s " TOK_KILL " %s%s :%s (%s <- %s (Nick collision))",
-                              NumServ(&me), NumNick(sptr), me.name, acptr->from->name,
-                              cptr->name);
+       sendcmdto_serv_butone(&me, CMD_KILL, sptr, "%C :%s (Nick collision)",
+                             sptr, cli_name(&me));
         assert(!MyConnect(sptr));
-#if 0
-        /*
-         * XXX - impossible
-         */
-        if (MyConnect(sptr))
-          sendto_one(cptr, "%s " TOK_KILL " %s%s :%s (Ghost 2)",
-                     NumServ(&me), NumNick(sptr), me.name);
-#endif
-        sptr->flags |= FLAGS_KILLED;
+
+        cli_flags(sptr) |= FLAGS_KILLED;
         exit_client(cptr, sptr, &me, "Nick collision (you're a ghost)");
         /*
          * we have killed sptr off, zero out it's pointer so if it's used
@@ -460,39 +459,34 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
          */
         sptr = 0;
       }
-      if (lastnick != acptr->lastnick)
+      if (lastnick != cli_lastnick(acptr))
         return 0;                /* Ignore the NICK */
     }
-    sendto_one(acptr, err_str(ERR_NICKCOLLISION), me.name, acptr->name, nick);
+    send_reply(acptr, ERR_NICKCOLLISION, nick);
   }
 
   ++ServerStats->is_kill;
-  acptr->flags |= FLAGS_KILLED;
+  cli_flags(acptr) |= FLAGS_KILLED;
   /*
    * This exits the client we had before getting the NICK message
    */
   if (differ) {
-    sendto_highprot_butone(cptr, 10,        /* Kill our old from outgoing servers */
-                           "%s " TOK_KILL " %s%s :%s (%s <- %s (older nick overruled))",
-                           NumServ(&me), NumNick(acptr), me.name, acptr->from->name,
-                           cptr->name);
+    sendcmdto_serv_butone(&me, CMD_KILL, acptr, "%C :%s (older nick "
+                         "overruled)", acptr, cli_name(&me));
     if (MyConnect(acptr))
-      sendto_one(cptr, "%s%s " TOK_QUIT " :Local kill by %s (Ghost)",
-                 NumNick(acptr), me.name);
+      sendcmdto_one(acptr, CMD_QUIT, cptr, ":Local kill by %s (Ghost)",
+                   cli_name(&me));
     exit_client(cptr, acptr, &me, "Nick collision (older nick overruled)");
   }
   else {
-    sendto_highprot_butone(cptr, 10,        /* Kill our old from outgoing servers */
-                          "%s " TOK_KILL " %s%s :%s (%s <- %s (nick collision from same user@host))",
-                          NumServ(&me), NumNick(acptr), me.name, acptr->from->name,
-                          cptr->name);
+    sendcmdto_serv_butone(&me, CMD_KILL, acptr, "%C :%s (nick collision from "
+                         "same user@host)", acptr, cli_name(&me));
     if (MyConnect(acptr))
-      sendto_one(cptr,
-                 "%s%s " TOK_QUIT " :Local kill by %s (Ghost: switched servers too fast)",
-                  NumNick(acptr), me.name);
+      sendcmdto_one(acptr, CMD_QUIT, cptr, ":Local kill by %s (Ghost: ",
+                   "switched servers too fast)", cli_name(&me));
     exit_client(cptr, acptr, &me, "Nick collision (You collided yourself)");
   }
-  if (lastnick == acptr->lastnick)
+  if (lastnick == cli_lastnick(acptr))
     return 0;
 
   assert(0 != sptr);
@@ -529,13 +523,13 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   int            differ = 1;
 
   if (parc < 2) {
-    sendto_one(sptr, err_str(ERR_NONICKNAMEGIVEN), me.name, parv[0]);
+    sendto_one(sptr, err_str(ERR_NONICKNAMEGIVEN), me.name, parv[0]); /* XXX DEAD */
     return 0;
   }
   else if ((IsServer(sptr) && parc < 8) || (IsServer(cptr) && parc < 3))
   {
     need_more_params(sptr, "NICK");
-    sendto_ops("bad NICK param count for %s from %s", parv[1], cptr->name);
+    sendto_ops("bad NICK param count for %s from %s", parv[1], cptr->name); /* XXX DEAD */
     return 0;
   }
   if (MyConnect(sptr) && (s = strchr(parv[1], '~')))
@@ -561,19 +555,19 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
    */
   if (do_nick_name(nick) == 0 || (IsServer(cptr) && strcmp(nick, parv[1])))
   {
-    sendto_one(sptr, err_str(ERR_ERRONEUSNICKNAME), me.name, parv[0], parv[1]);
+    sendto_one(sptr, err_str(ERR_ERRONEUSNICKNAME), me.name, parv[0], parv[1]); /* XXX DEAD */
 
     if (IsServer(cptr))
     {
       ServerStats->is_kill++;
-      sendto_ops("Bad Nick: %s From: %s %s",
+      sendto_ops("Bad Nick: %s From: %s %s", /* XXX DEAD */
           parv[1], parv[0], cptr->name);
-      sendto_one(cptr, "%s " TOK_KILL " %s :%s (%s <- %s[%s])",
+      sendto_one(cptr, "%s " TOK_KILL " %s :%s (%s <- %s[%s])", /* XXX DEAD */
             NumServ(&me), IsServer(sptr) ? parv[parc - 2] : parv[0], me.name,
             parv[1], nick, cptr->name);
       if (!IsServer(sptr))        /* bad nick _change_ */
       {
-        sendto_highprot_butone(cptr, 10, "%s " TOK_KILL " %s :%s (%s <- %s!%s@%s)",
+        sendto_highprot_butone(&me, 10, "%s " TOK_KILL " %s :%s (%s <- %s!%s@%s)", /* XXX DEAD */
             NumServ(&me), parv[0], me.name, cptr->name,
             parv[0], sptr->user ? sptr->username : "",
             sptr->user ? sptr->user->server->name : cptr->name);
@@ -588,7 +582,7 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
    */
   if ((!IsServer(cptr)) && isNickJuped(nick))
   {
-    sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name,
+    sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name, /* XXX DEAD */
         /* parv[0] is empty when connecting */
         EmptyString(parv[0]) ? "*" : parv[0], nick);
     return 0;                        /* NICK message ignored */
@@ -602,13 +596,20 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
    * is present in the nicklist (due to the way the below for loop is
    * constructed). -avalon
    */
-  if ((acptr = FindServer(nick))) {
+   
+  acptr = FindServer(nick);
+  
+  if (acptr) { /* There is a nick collision with a server */
     if (MyConnect(sptr))
     {
-      sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name,
+      /* Local user trying to use a nick thats a server
+       * Return an error message and ignore the command
+       */
+      sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name, /* XXX DEAD */
           EmptyString(parv[0]) ? "*" : parv[0], nick);
       return 0;                        /* NICK message ignored */
     }
+    
     /*
      * We have a nickname trying to use the same name as
      * a server. Send out a nick collision KILL to remove
@@ -616,18 +617,21 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
      * there is no danger of the server being disconnected.
      * Ultimate way to jupiter a nick ? >;-). -avalon
      */
-    sendto_ops("Nick collision on %s(%s <- %s)",
+    sendto_ops("Nick collision on %s(%s <- %s)", /* XXX DEAD */
                sptr->name, acptr->from->name, cptr->name);
     ServerStats->is_kill++;
-    sendto_one(cptr, "%s " TOK_KILL " %s%s :%s (%s <- %s)",
+    sendto_one(cptr, "%s " TOK_KILL " %s%s :%s (%s <- %s)", /* XXX DEAD */
                NumServ(&me), NumNick(sptr), me.name, acptr->from->name,
                cptr->name);
     sptr->flags |= FLAGS_KILLED;
     return exit_client(cptr, sptr, &me, "Nick/Server collision");
   }
+  
+  acptr = FindClient(nick);
 
-  if (!(acptr = FindClient(nick)))
-    return set_nick_name(cptr, sptr, nick, parc, parv);  /* No collisions, all clear... */
+  /* No collisions?  Set the nick name and we're done */
+  if (!acptr)
+    return set_nick_name(cptr, sptr, nick, parc, parv);
   /*
    * If acptr == sptr, then we have a client doing a nick
    * change between *equivalent* nicknames as far as server
@@ -678,7 +682,7 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
      * NICK is coming from local client connection. Just
      * send error reply and ignore the command.
      */
-    sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name,
+    sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name, /* XXX DEAD */
         /* parv[0] is empty when connecting */
         EmptyString(parv[0]) ? "*" : parv[0], nick);
     return 0;                        /* NICK message ignored */
@@ -706,7 +710,7 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
      */
     differ =  (acptr->ip.s_addr != htonl(base64toint(parv[parc - 3]))) ||
             (0 != ircd_strcmp(acptr->user->username, parv[4]));
-    sendto_ops("Nick collision on %s (%s " TIME_T_FMT " <- %s " TIME_T_FMT
+    sendto_ops("Nick collision on %s (%s " TIME_T_FMT " <- %s " TIME_T_FMT /* XXX DEAD */
                " (%s user@host))", acptr->name, acptr->from->name, acptr->lastnick,
                cptr->name, lastnick, differ ? "Different" : "Same");
   }
@@ -718,7 +722,7 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
     lastnick = atoi(parv[2]);
     differ =  (acptr->ip.s_addr != sptr->ip.s_addr) ||
             (0 != ircd_strcmp(acptr->user->username, sptr->user->username));              
-    sendto_ops("Nick change collision from %s to %s (%s " TIME_T_FMT " <- %s "
+    sendto_ops("Nick change collision from %s to %s (%s " TIME_T_FMT " <- %s " /* XXX DEAD */
                TIME_T_FMT ")", sptr->name, acptr->name, acptr->from->name,
                acptr->lastnick, cptr->name, lastnick);
   }
@@ -737,12 +741,12 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
       if (!IsServer(sptr))
       {
         ServerStats->is_kill++;
-        sendto_highprot_butone(cptr, 10,        /* Kill old from outgoing servers */
+        sendto_highprot_butone(cptr, 10,        /* Kill old from outgoing servers */ /* XXX DEAD */
                                "%s " TOK_KILL " %s%s :%s (%s <- %s (Nick collision))",
                                NumServ(&me), NumNick(sptr), me.name, acptr->from->name,
                                cptr->name);
         if (MyConnect(sptr) && IsServer(cptr) && Protocol(cptr) > 9)
-          sendto_one(cptr, "%s " TOK_KILL " %s%s :%s (Ghost2)",
+          sendto_one(cptr, "%s " TOK_KILL " %s%s :%s (Ghost2)", /* XXX DEAD */
                      NumServ(&me), NumNick(sptr), me.name);
         sptr->flags |= FLAGS_KILLED;
         exit_client(cptr, sptr, &me, "Nick collision (you're a ghost)");
@@ -750,29 +754,29 @@ int m_nick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
       if (lastnick != acptr->lastnick)
         return 0;                /* Ignore the NICK */
     }
-    sendto_one(acptr, err_str(ERR_NICKCOLLISION), me.name, acptr->name, nick);
+    sendto_one(acptr, err_str(ERR_NICKCOLLISION), me.name, acptr->name, nick); /* XXX DEAD */
   }
   ServerStats->is_kill++;
   acptr->flags |= FLAGS_KILLED;
   if (differ)
   {
-    sendto_highprot_butone(cptr, 10,        /* Kill our old from outgoing servers */
+    sendto_highprot_butone(cptr, 10,        /* Kill our old from outgoing servers */ /* XXX DEAD */
                            "%s " TOK_KILL " %s%s :%s (%s <- %s (older nick overruled))",
                            NumServ(&me), NumNick(acptr), me.name, acptr->from->name,
                            cptr->name);
     if (MyConnect(acptr) && IsServer(cptr) && Protocol(cptr) > 9)
-      sendto_one(cptr, "%s%s " TOK_QUIT " :Local kill by %s (Ghost)",
+      sendto_one(cptr, "%s%s " TOK_QUIT " :Local kill by %s (Ghost)", /* XXX DEAD */
           NumNick(acptr), me.name);
     exit_client(cptr, acptr, &me, "Nick collision (older nick overruled)");
   }
   else
   {
-    sendto_highprot_butone(cptr, 10,        /* Kill our old from outgoing servers */
+    sendto_highprot_butone(cptr, 10,        /* Kill our old from outgoing servers */ /* XXX DEAD */
                            "%s " TOK_KILL " %s%s :%s (%s <- %s (nick collision from same user@host))",
                            NumServ(&me), NumNick(acptr), me.name, acptr->from->name,
                            cptr->name);
     if (MyConnect(acptr) && IsServer(cptr) && Protocol(cptr) > 9)
-      sendto_one(cptr,
+      sendto_one(cptr, /* XXX DEAD */
           "%s%s " TOK_QUIT " :Local kill by %s (Ghost: switched servers too fast)",
           NumNick(acptr), me.name);
     exit_client(cptr, acptr, &me, "Nick collision (You collided yourself)");