Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Because there is no point in letting the table fill up with records that are excluded from the ip ban queries.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -589,3 +589,12 @@
'sbl-xbl.spamhaus.org'
)));
}
+
+/**
+ * Implementation of hook_cron
+ */
+function troll_cron() {
+
+ // Clean up expired IP addresses from IP ban table
+ db_query('DELETE FROM {troll_ip_ban} WHERE expires > 1000000000 AND expires < %d', time());
+}
Comments
Comment #1
bibo CreditAttribution: bibo commentedI wonder if this should also work with D7?
Comment #2
mgiffordWould be a useful thing to evaluate. I don't see why it wouldn't.
Comment #3
mgifford