From 4b4dfced56fb082c0d0b6a157f5a4b92d4543812 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Wed, 10 May 2017 11:55:38 -0400 Subject: [PATCH] Add minor changes --- app.cfg | 8 +++++--- lib/App/Controller/Paste.pm | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app.cfg b/app.cfg index 66cc334..7f78f58 100644 --- a/app.cfg +++ b/app.cfg @@ -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" diff --git a/lib/App/Controller/Paste.pm b/lib/App/Controller/Paste.pm index 0a24761..6ed4731 100644 --- a/lib/App/Controller/Paste.pm +++ b/lib/App/Controller/Paste.pm @@ -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);