mirror of
https://github.com/perlbot/perlbuut-pastebin
synced 2025-06-07 14:17:26 -04:00
More fixes. Brought announcement back hopefully
This commit is contained in:
parent
ccb4e90463
commit
b86769b4bd
2 changed files with 7 additions and 7 deletions
|
@ -34,7 +34,7 @@ sub api_get_paste {
|
|||
username => $row->{who},
|
||||
description => $row->{desc},
|
||||
language => $row->{language},
|
||||
output => get_eval($pasteid, $row->{paste})
|
||||
output => $c->eval->get_eval($pasteid, $row->{paste}, $row->{language})
|
||||
};
|
||||
|
||||
$c->render(json => $data);
|
||||
|
@ -61,9 +61,9 @@ sub api_post_paste {
|
|||
# if (my $type = App::Spamfilter::is_spam($c, $who, $desc, $code)) {
|
||||
# warn "I thought this was spam! $type";
|
||||
# } else {
|
||||
# if ($channel) { # TODO config for allowing announcements
|
||||
# IRC::Perlbot::announce($channel, $who, substr($desc, 0, 40), "https://perlbot.pl/pastebin/$id");
|
||||
## }
|
||||
if ($channel) { # TODO config for allowing announcements
|
||||
$c->perlbot->announce($channel, $who, substr($desc, 0, 40), "https://perlbot.pl/pastebin/$id");
|
||||
}
|
||||
# }
|
||||
|
||||
$c->render(json => {
|
||||
|
|
|
@ -53,9 +53,9 @@ sub post_paste {
|
|||
# FIXME do this properly
|
||||
# if (my $type = App::Spamfilter::is_spam($c, $who, $desc, $code)) {
|
||||
# warn "I thought this was spam! $type";
|
||||
# } else {
|
||||
# IRC::Perlbot::announce($c->param('chan'), $c->param('name'), substr($c->param('desc'), 0, 40), "https://perlbot.pl/pastebin/$id");
|
||||
# }
|
||||
if ($channel) { # TODO config for allowing announcements
|
||||
$c->perlbot->announce($channel, $who, substr($desc, 0, 40), "https://perlbot.pl/pastebin/$id");
|
||||
}
|
||||
|
||||
$c->redirect_to('/pastebin/'.$id);
|
||||
#$c->render(text => "post accepted! $id");
|
||||
|
|
Loading…
Add table
Reference in a new issue