chmode: convert bants to a proper serial

This way it increments for every change. It need not be a timestamp, as
its actual value is not important.

This fixes an issue where a ban could be set, hit, and cleared all in
the same second, and the affected client would still be cached as banned
because the bants hadn't actually changed.
This commit is contained in:
Doug Freed 2022-11-16 16:44:25 -05:00
parent 2a64b1e5b9
commit 4a47689a35

View file

@ -280,7 +280,7 @@ add_id(struct Client *source_p, struct Channel *chptr, const char *banid, const
/* invalidate the can_send() cache */
if(mode_type == CHFL_BAN || mode_type == CHFL_QUIET || mode_type == CHFL_EXCEPTION)
chptr->bants = rb_current_time();
chptr->bants++;
return actualBan;
}
@ -310,7 +310,7 @@ del_id(struct Channel *chptr, const char *banid, rb_dlink_list * list, long mode
/* invalidate the can_send() cache */
if(mode_type == CHFL_BAN || mode_type == CHFL_QUIET || mode_type == CHFL_EXCEPTION)
chptr->bants = rb_current_time();
chptr->bants++;
return banptr;
}