return 0;
/* We go ahead and pass on the KICK for users not on the channel */
- if (!(member = find_member_link(chptr, who)) || IsZombie(member))
+ member = find_member_link(chptr, who);
+ if (member && IsZombie(member))
+ {
+ /* We might get a KICK from a zombie's own server because the user
+ * net-rode during a burst (which always generates a KICK) *and*
+ * was kicked via another server. In that case, we must remove
+ * the user from the channel.
+ */
+ if (sptr == cli_user(who)->server)
+ {
+ remove_user_from_channel(who, chptr);
+ }
+ /* Otherwise, we treat zombies like they are not channel members. */
member = 0;
+ }
/* Send HACK notice, but not for servers in BURST */
/* 2002-10-17: Don't send HACK if the users local server is kicking them */
if (IsServer(sptr) &&
!IsBurstOrBurstAck(sptr) &&
- sptr!=cli_from(who))
+ sptr!=cli_user(who)->server)
sendto_opmask_butone(0, SNO_HACK4, "HACK: %C KICK %H %C %s", sptr, chptr,
who, comment);