Author: Carlo Wood <run@alinoe.com> (Via Isomer <isomer@undernet.org>)
[ircu2.10.12-pk.git] / ircd / s_misc.c
index b4d9af7013dd85294f46eb911b0d5c36a3cd3f3e..1344f867220281693ddc3eaadce43a3763244e76 100644 (file)
@@ -54,6 +54,7 @@
 #include "sys.h"
 #include "uping.h"
 #include "userload.h"
+#include "map.h"
 
 #include <assert.h>
 #include <fcntl.h>
@@ -233,7 +234,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 +246,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 +415,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)) &&
@@ -470,6 +476,10 @@ int exit_client(struct Client *cptr,    /* Connection being handled by
                           get_client_name(killer, HIDE_IP));
     sendto_opmask_butone(0, SNO_NETWORK, "Net break: %C %C (%s)",
                         cli_serv(victim)->up, victim, comment);
+
+#ifdef HEAD_IN_SAND_MAP    
+    map_update(victim);
+#endif
   }
 
   /*