CF
add_action( 'spam_comment', 'pizda_rulu', 10, 2 );
function pizda_rulu( $comment_id, $comment ){
$ipList = explode("\n", get_option('disallowed_keys'));
array_push($ipList, $comment->comment_author_IP);
$ipList = implode("\n", array_unique($ipList));
update_option('disallowed_keys', $ipList, FALSE);
}