Author: Gavin Grieve <hektik@dimebox.net> (by way of Kev <klmitch@mit.edu>)
[ircu2.10.12-pk.git] / ircd / channel.c
index b477c6c08ed6bc4c14a07725453edc2541cd2944..0e8ba0178e2a09c3a6e8237fef2e969e3e3425c1 100644 (file)
@@ -3139,6 +3139,11 @@ joinbuf_join(struct JoinBuf *jbuf, struct Channel *chan, unsigned int flags)
 
   if (jbuf->jb_type == JOINBUF_TYPE_PART ||
       jbuf->jb_type == JOINBUF_TYPE_PARTALL) {
+    struct Membership *member = find_member_link(chan, jbuf->jb_source);
+    if (IsUserParting(member))
+      return;
+    SetUserParting(member);
+
     /* Send notification to channel */
     if (!(flags & CHFL_ZOMBIE))
       sendcmdto_channel_butserv_butone(jbuf->jb_source, CMD_PART, chan, NULL,