MWX/SpamFerret/views/ClientThrottle: Difference between revisions
< MWX | SpamFerret | views
Jump to navigation
Jump to search
(extracted from main page) |
m (Woozle moved page SpamFerret/views/ClientThrottle to MWX/SpamFerret/views/ClientThrottle without leaving a redirect: most mediawiki extensions belong under MWX now) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Purpose''': This view is for pre-screening {{spamferret|table|clients}} ([[IP address]]es) -- includes a column showing how long since the last spam attempt (in seconds) and another to indicate whether a client is permanently blocked. | * '''Purpose''': This view is for pre-screening {{spamferret|table|clients}} ([[IP address]]es) -- 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== | ==SQL== | ||
<mysql>CREATE OR REPLACE VIEW `ClientThrottle` AS | <mysql>CREATE OR REPLACE VIEW `ClientThrottle` AS | ||
Line 13: | Line 15: | ||
doBlock | doBlock | ||
FROM clients;</mysql> | 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> |
Latest revision as of 20:14, 1 May 2022
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.
- 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>