Author: Ghostwolf <foxxe@wtfs.net>
[ircu2.10.12-pk.git] / ircd / s_misc.c
index b4d9af7013dd85294f46eb911b0d5c36a3cd3f3e..1ea6d8ca701051c102ccf9562bcd05d74059dd9c 100644 (file)
@@ -233,7 +233,7 @@ static void exit_one_client(struct Client* bcptr, const char* comment)
      * that the client can show the "**signoff" message).
      * (Note: The notice is to the local clients *only*)
      */
-    sendcmdto_common_channels(bcptr, CMD_QUIT, ":%s", comment);
+    sendcmdto_common_channels_butone(bcptr, CMD_QUIT, NULL, ":%s", comment);
 
     remove_user_from_all_channels(bcptr);
 
@@ -245,6 +245,10 @@ static void exit_one_client(struct Client* bcptr, const char* comment)
     while ((lp = cli_user(bcptr)->silence))
       del_silence(bcptr, lp->value.cp);
 
+    /* Clean up snotice lists */
+    if (MyUser(bcptr))
+      set_snomask(bcptr, ~0, SNO_DEL);
+
     if (IsInvisible(bcptr))
       --UserStats.inv_clients;
     if (IsOper(bcptr))
@@ -410,7 +414,8 @@ int exit_client(struct Client *cptr,    /* Connection being handled by
                          cli_name(killer), comment);
          else
            sendrawto_one(victim, MSG_ERROR " :Closing Link: %s by %s (%s)",
-                         cli_name(victim), cli_name(killer), comment);
+                         cli_name(victim), IsServer(killer) ? cli_name(&me) :
+                         cli_name(killer), comment);
        }
       }
       if ((IsServer(victim) || IsHandshake(victim) || IsConnecting(victim)) &&