0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 16:34:13 +01:00

channel: actually, use bancache invalidation as the metric for the duplication check

any state change which would cause the duplicate check to change would invalidate bancache as a whole anyway
This commit is contained in:
William Pitcock 2015-12-13 08:17:04 -06:00
parent 2f9687c48c
commit 1e8138afb0

View file

@ -674,7 +674,7 @@ is_banned(struct Channel *chptr, struct Client *who, struct membership *msptr,
if (chptr->last_checked_client != NULL &&
who == chptr->last_checked_client &&
chptr->last_checked_type == CHFL_BAN &&
rb_current_time() - chptr->last_checked_ts < 5)
chptr->last_checked_ts > chptr->bants)
return chptr->last_checked_result;
chptr->last_checked_type = CHFL_BAN;
@ -698,7 +698,7 @@ is_quieted(struct Channel *chptr, struct Client *who, struct membership *msptr,
if (chptr->last_checked_client != NULL &&
who == chptr->last_checked_client &&
chptr->last_checked_type == CHFL_QUIET &&
rb_current_time() - chptr->last_checked_ts < 5)
chptr->last_checked_ts > chptr->bants)
return chptr->last_checked_result;
chptr->last_checked_type = CHFL_QUIET;