You are here

function _cloudflare_ban_comment in CloudFlare 6

Same name and namespace in other branches
  1. 7 cloudflare.module \_cloudflare_ban_comment()
1 call to _cloudflare_ban_comment()
cloudflare_form_comment_admin_overview_alter in ./cloudflare.module
Implementation of hook_form_FORM_ID_alter().

File

./cloudflare.module, line 136

Code

function _cloudflare_ban_comment($cid, $deletecid = FALSE) {
  $ip = _get_ip_address_from_comment($cid);
  if (_cloudflare_ban_ip($ip) == "OK" && $deletecid) {

    // only delete the comment if action returned true.
    _cloudflare_delete_comment($cid);
  }
}