You are here

function spam_filter_custom_spamapi in Spam 6

Spam API Hook

File

filters/spam_filter_custom/spam_filter_custom.module, line 33
Custom spam filter module Copyright(c) 2007-2009 Jeremy Andrews <jeremy@tag1consulting.com>.

Code

function spam_filter_custom_spamapi($op, $type = NULL, $content = array(), $fields = array(), $extra = NULL) {
  switch ($op) {
    case 'filter':
      if (!module_invoke('spam', 'filter_enabled', 'spam_filter_custom', $type, $content, $fields, $extra)) {
        return;
      }
      return spam_filter_custom_spam_filter($content, $type, $fields, $extra);
    case 'filter_module':
      return 'spam_filter_custom';
    case 'filter_info':
      return array(
        'name' => t('Custom filter'),
        'module' => t('spam_filter_custom'),
        'description' => t('Custom spam filters.'),
        'help' => t('The custom spam filter module allows you to manually define custom spam filter rules.'),
      );
    case 'filter_install':
      return array(
        'status' => SPAM_FILTER_ENABLED,
        'gain' => 250,
        'weight' => -4,
      );
  }
}