]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
src/channel.c: don't use the bancache in is_banned()/is_quieted()
authorAaron Jones <redacted>
Wed, 5 Jul 2017 17:35:28 +0000 (17:35 +0000)
committerAaron Jones <redacted>
Wed, 5 Jul 2017 17:35:28 +0000 (17:35 +0000)
The bancache will be re-architected onto clients in future for easier
invalidation, but this is a good-enough temporary fix for issue #243

Fixes #243

src/channel.c

index 180a45070920611e20f2248a031c7cffe05b822c..d2590b451ff1a8588f1f63d3d8c979dd2b9b994f 100644 (file)
@@ -671,6 +671,7 @@ int
 is_banned(struct Channel *chptr, struct Client *who, struct membership *msptr,
          const char *s, const char *s2, const char **forward)
 {
+#if 0
        if (chptr->last_checked_client != NULL &&
                who == chptr->last_checked_client &&
                chptr->last_checked_type == CHFL_BAN &&
@@ -683,6 +684,9 @@ is_banned(struct Channel *chptr, struct Client *who, struct membership *msptr,
        chptr->last_checked_ts = rb_current_time();
 
        return chptr->last_checked_result;
+#else
+       return is_banned_list(chptr, &chptr->banlist, who, msptr, s, s2, forward);
+#endif
 }
 
 /* is_quieted()
@@ -696,6 +700,7 @@ int
 is_quieted(struct Channel *chptr, struct Client *who, struct membership *msptr,
           const char *s, const char *s2)
 {
+#if 0
        if (chptr->last_checked_client != NULL &&
                who == chptr->last_checked_client &&
                chptr->last_checked_type == CHFL_QUIET &&
@@ -708,6 +713,9 @@ is_quieted(struct Channel *chptr, struct Client *who, struct membership *msptr,
        chptr->last_checked_ts = rb_current_time();
 
        return chptr->last_checked_result;
+#else
+       return is_banned_list(chptr, &chptr->quietlist, who, msptr, s, s2, NULL);
+#endif
 }
 
 /* can_join()