You are here

function spam_get_probability in Spam 5

3 calls to spam_get_probability()
spam_content_filter in ./spam.module
Determine whether or not provided text is spam.
spam_tokens_save in ./spam.module
spam_tokens_unsave in ./spam.module

File

./spam.module, line 2257

Code

function spam_get_probability($probability, $weight = 0) {
  $probability = $probability + $weight;
  if ($probability > 99) {
    $probability = 99;
  }
  else {
    if ($probability < 1) {
      $probability = 1;
    }
  }
  return $probability;
}