announce QUIT of the source client when recovering a zombie
[ircu2.10.12-pk.git] / ircd / s_misc.c
index 9993f58492ddf84e1167fbfe75a8d9be46e6ecaa..2dd7b8296860862f5298b333873f51327c73cdcc 100644 (file)
@@ -371,12 +371,16 @@ void unzombie_client(struct Client *cptr, struct Client *sptr, struct Client *ac
   ClearOper(victim);
   ClearNotConn(victim);
 
+  /* announce "disconnect" of the source client */
+  sendcmdto_common_channels_butone_audit(acptr, CMD_QUIT, NULL, ":Switched to %s", cli_name(victim));
+  remove_user_from_all_channels(acptr);
+
   if (MyConnect(victim)) {
     /* inform client about "new" modes */
     struct Flags setflags = cli_flags(acptr);
     struct Membership *chan;
     sendcmdto_one(acptr, CMD_NICK, victim, "%C", victim);
-    send_umode(victim, victim, &setflags, ALL_UMODES);
+    send_umode(victim, victim, &setflags, ALL_UMODES, 0);
 
     /*
      * mark current client as zombie on all channels so that it does not show