Active
Project:
Troll
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2011 at 03:45 UTC
Updated:
16 Dec 2015 at 14:31 UTC
Jump to comment: Most recent
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 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