function autoban_ban_all in Automatic IP ban (Autoban) 7
Ban all IP's for rules.
Return value
int Number of successful IP insertion for all rules.
3 calls to autoban_ban_all()
- autoban_cron in ./
autoban.module - Implements hook_cron().
- autoban_page_build in ./
autoban.module - Implements hook_page_build().
- drush_autoban_ban_all in ./
autoban.drush.inc - Drush command logic. drush_[COMMAND_NAME]().
File
- ./
autoban.module, line 248 - Main file for autoban module.
Code
function autoban_ban_all() {
$count = 0;
$rules = autoban_get_rules();
if (!empty($rules)) {
foreach ($rules as $rule) {
$count += autoban_ban($rule);
}
}
return $count;
}