MWX/SpamFerret/views/ClientThrottle

From Woozle Writes Code
< MWX‎ | SpamFerret‎ | views
Revision as of 20:06, 5 August 2009 by Woozle (talk | contribs) (extracted from main page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: This view is for pre-screening Template:Spamferret (IP addresses) -- includes a column showing how long since the last spam attempt (in seconds) and another to indicate whether a client is permanently blocked.

SQL

<mysql>CREATE OR REPLACE VIEW `ClientThrottle` AS

 SELECT
   ID,
   Address,
   WhenFirst,
   WhenLast,
   Count,
   IFNULL(Retries,0) AS Retries,
   TIMESTAMPDIFF(SECOND,WhenLast,NOW()) AS ThrottleTime,
   doBlock
 FROM clients;</mysql>