SpamFerret/views/ClientThrottle

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to: navigation, search

About

  • Purpose: This view is for pre-screening clients (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.
  • History:
    • 2009-08-08 created ClientThrottle2 as temporary measure until legacy code can be gotten rid of

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>

<mysql>CREATE OR REPLACE VIEW `ClientThrottle2` AS

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