function spam_filter_surbl_spamapi in Spam 6
Spam hook_spamapi implementation.
File
- filters/
spam_filter_surbl/ spam_filter_surbl.module, line 24 - Surbl filter plug in for the spam module. Copyright(c) 2007-2008 Jeremy Andrews <jeremy@tag1consulting.com>.
Code
function spam_filter_surbl_spamapi($op, $type = NULL, $content = array(), $fields = array(), $extra = NULL) {
switch ($op) {
case 'filter':
if (!module_invoke('spam', 'filter_enabled', 'spam_filter_surbl', $type, $content, $fields, $extra)) {
return;
}
return spam_filter_surbl_spam_filter($content, $type, $fields, $extra);
case 'filter_module':
return 'spam_filter_surbl';
case 'filter_info':
return array(
'name' => t('Surbl filter'),
'module' => t('spam_filter_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,
);
}
}