1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut-pastebin synced 2025-06-07 14:17:26 -04:00

Add minor changes

This commit is contained in:
Ryan Voots 2017-05-10 11:55:38 -04:00
parent 378c0d95a6
commit 4b4dfced56
2 changed files with 9 additions and 4 deletions

View file

@ -39,9 +39,11 @@ protocol="perlbot"
[announce.channels]
"localhost:perlbot:#perl"="Freenode #perl"
"localhost:perlbot:#perlbot"="Freenode #perlbot"
"localhost:perlbot:#web"="Freenode #web"
"localhost:perlbot:#web-social"="Freenode #web-social"
"localhost:perlbot:#perlcafe"="Freenode #perlcafe"
"localhost:perlbot:#perlbot"="Freenode #perlbot"
"localhost:perlbot:##botparadise"="Freenode ##botparadise"
"localhost:perlbot:#buubot"="Freenode #buubot"
"localhost:perlbot-magnet:#perl"="irc.perl.net #perl"
"localhost:perlbot-magnet:#perl-help"="irc.perl.net #perl-help"
"localhost:perlbot-magnet:#perl"="irc.perl.org #perl"
"localhost:perlbot-magnet:#perl-help"="irc.perl.org #perl-help"

View file

@ -55,7 +55,10 @@ sub post_paste {
# if (my $type = App::Spamfilter::is_spam($c, $who, $desc, $code)) {
# warn "I thought this was spam! $type";
if ($channel) { # TODO config for allowing announcements
$c->perlbot->announce($channel, $who, substr($desc, 0, 40), "https://perlbot.pl/pastebin/$id");
my $words = qr/nigger|jew|spic|tranny|trannies|fuck|shit|piss|cunt|asshole/i;
unless ($code =~ $words || $who =~ $words || $desc =~ $words) {
$c->perlbot->announce($channel, $who, substr($desc, 0, 40), "https://perlbot.pl/pastebin/$id");
}
}
$c->redirect_to('/pastebin/'.$id);