Use latest guestbook

This commit is contained in:
swagg boi 2021-05-02 19:07:50 -04:00
parent b75df77065
commit 164258d02a

View file

@ -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`"
}
);
}