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:
parent
378c0d95a6
commit
4b4dfced56
2 changed files with 9 additions and 4 deletions
8
app.cfg
8
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"
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue