summaryrefslogtreecommitdiffstats
path: root/txrban.txr
diff options
context:
space:
mode:
Diffstat (limited to 'txrban.txr')
-rw-r--r--txrban.txr6
1 files changed, 4 insertions, 2 deletions
diff --git a/txrban.txr b/txrban.txr
index f66f76e..355bacf 100644
--- a/txrban.txr
+++ b/txrban.txr
@@ -82,8 +82,10 @@
(defun do-expiry (now-time)
(dohash (ip cli client-hash)
- (if (and cli.banned (<= (to cli.banned) now-time))
- (unban cli))))
+ (when (and cli.banned (<= (to cli.banned) now-time))
+ (unban cli)
+ (when (null cli.access-hist)
+ (del [client-hash ip])))))
(defun unban (cli)
(unless *dry-run*