Use latest guestbook
This commit is contained in:
parent
b75df77065
commit
164258d02a
|
@ -134,20 +134,28 @@ sub params_in {
|
|||
}
|
||||
|
||||
# Variable set for banned user
|
||||
my $ban;
|
||||
my ($ban, $trigger);
|
||||
|
||||
# Parse the banned names list
|
||||
chomp(my @nameBan = <$nameBans>);
|
||||
for (@nameBan) {
|
||||
last if $ban;
|
||||
$ban = 1 if $name =~ /$_/;
|
||||
|
||||
if ($name =~ /$_/i) {
|
||||
$ban = 1;
|
||||
$trigger = $_;
|
||||
}
|
||||
}
|
||||
|
||||
# Parse the banned phrases list
|
||||
chomp(my @thoughtCrime = <$thoughtCrimes>);
|
||||
for (@thoughtCrime) {
|
||||
last if $ban;
|
||||
$ban = 1 if $message =~ /$_/;
|
||||
|
||||
if ($message =~ /$_/i) {
|
||||
$ban = 1;
|
||||
$trigger = $_;
|
||||
}
|
||||
}
|
||||
|
||||
# Send it unless ban is true; else send it to spam if spam chan is
|
||||
|
@ -159,11 +167,13 @@ sub params_in {
|
|||
message => "$name from $location says: $message"
|
||||
}
|
||||
);
|
||||
} elsif ($spam) {
|
||||
}
|
||||
elsif ($spam) {
|
||||
$resource->create(
|
||||
{
|
||||
channel_id => "$spam",
|
||||
message => "$name from $location says: $message"
|
||||
message => "$name from $location says: $message\n\n" .
|
||||
"Spam trigger: `$trigger`"
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue