You are here

function surbl_spamapi in Spam 5.3

Spam hook_spamapi implementation.

File

filters/surbl/surbl.module, line 23

Code

function surbl_spamapi($op, $type = NULL, $content = array(), $fields = array(), $extra = NULL) {
  switch ($op) {
    case 'filter':
      if (!module_invoke('spam', 'filter_enabled', 'surbl', $type, $content, $fields, $extra)) {
        return;
      }
      return surbl_spam_filter($content, $type, $fields, $extra);
    case 'filter_module':
      return 'surbl';
    case 'filter_info':
      return array(
        'name' => t('Surbl filter'),
        'module' => t('surbl'),
        'description' => t('A spam url filter.'),
        'help' => t('Look up URLs in SURBL to determine if is spam.'),
      );
      break;
    case 'filter_install':
      return array(
        'status' => SPAM_FILTER_ENABLED,
        'gain' => 250,
        'weight' => -7,
      );
  }
}