@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phosweb009 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Current Path :
/
homepage
/
v-mt
/
plugins
/
spamlookup
/
Path :
Upload File :
New :
File
Dir
/homepage/v-mt/plugins/spamlookup/spamlookup_words.pl
# Movable Type (r) (C) 2004-2008 Six Apart, Ltd. All Rights Reserved. # This code cannot be redistributed without permission from www.sixapart.com. # For more information, consult your Movable Type license. # # $Id: spamlookup_words.pl 1174 2008-01-08 21:02:50Z bchoate $ # Original copyright (c) 2004-2006, Brad Choate and Tobias Hoellrich package MT::Plugin::SpamLookup::KeywordFilter; use strict; use MT; use MT::Plugin; use vars qw($VERSION); sub BEGIN { @MT::Plugin::SpamLookup::KeywordFilter::ISA = ('MT::Plugin'); $VERSION = '2.1'; my $plugin; $plugin = new MT::Plugin::SpamLookup::KeywordFilter({ name => 'SpamLookup - Keyword Filter', version => $VERSION, description => '<MT_TRANS phrase="SpamLookup module for moderating and junking feedback using keyword filters.">', doc_link => 'http://www.spamlookup.com/wiki/KeywordFilter', author_name => 'Six Apart, Ltd.', author_link => 'http://www.sixapart.com/', config_template => 'word_config.tmpl', l10n_class => 'spamlookup::L10N', settings => new MT::PluginSettings([ ['wordlist_moderate'], ['wordlist_junk', { Default => q{# Your Junk keyword list can contain words, phrases, patterns, # and domain names. Each item must be on a separate line. # # Words and phrases can be listed plainly. They are tested in a # case-insensitive manner and match against "whole" words: cialis # Patterns are Perl regular expressions. /online-?casino/i # You can optionally place a score at the end of the line to adjust # the penalty applied for matching that item. phentermine 4}} ], ]), registry => { junk_filters => { spamlookup_wordfilter => { label => "SpamLookup Keyword Filter", code => sub { $plugin->runner('wordfilter', @_) }, }, }, }, }); MT->add_plugin($plugin); } sub runner { my $plugin = shift; my $method = shift; require spamlookup; return $_->($plugin, @_) if $_ = \&{"spamlookup::$method"}; die "Failed to find spamlookup::$method"; } sub apply_default_settings { my $plugin = shift; my ($data, $scope) = @_; if ($scope ne 'system') { my $sys = $plugin->get_config_obj('system'); my $sysdata = $sys->data(); if ($plugin->{settings} && $sysdata) { foreach (keys %$sysdata) { $data->{$_} = $sysdata->{$_} if !exists $data->{$_}; } } } else { $plugin->SUPER::apply_default_settings(@_); } } 1;