spam_karma_blacklist_do_ban

spam_karma_blacklist_ban_activate

Action run before the plugin initializes, i.e., alters the sk2_blacklist table structure.

spam_karma_blacklist_ban_deactivate

Action run after the plugin deinitializes, i.e., restores the sk2_blacklist table structure.

Installation

Upload spam-karma-blacklist-ban.php to the /wp-content/plugins/ directory

Activate the plugin through the ‘Plugins’ menu in WordPress

FAQ

Is this a permanent ban?

No. If you would look at your Spam Karma 2 admin screens, under “Blacklist”, there is a section that instructs Spam Karma to remove blacklist entries added or last used more than x days ago with scores less than y. This is where you configure whether and which IPs are banned temporarily or permanently.

Is this fast?

We made this with speed foremost in mind. During plugin initialization, the plugin tells MySQL to create an table index of the SK2 Blacklist table. IP lookup therefore becomes insanely fast.

This plugin fires at the very first stage of the WordPress loading process, so the offender is banned there and no further WordPress processing takes place.

How do I ban offenders caught more than 5 or less than 5 times?

Two ways to do this:

Define SPAM_KARMA_BLACKLIST_COUNT_TO_BAN in your wp_config.php, or edit the plugin directly.

Create a filter to spam_karma_blacklist_ban_count in your theme’s functions.php. For example,