mirror of
https://github.com/perlbot/perlbuut-pastebin
synced 2025-06-07 14:17:26 -04:00
Merge branch 'master' of github.com:perlbot/perlbuut-pastebin
This commit is contained in:
commit
e164c92df6
8 changed files with 41 additions and 33 deletions
34
app.cfg
34
app.cfg
|
@ -3,6 +3,9 @@ memcached=true
|
||||||
evalserver=true
|
evalserver=true
|
||||||
blogspam=false
|
blogspam=false
|
||||||
|
|
||||||
|
[mojolicious.hypnotoad]
|
||||||
|
listen=["http://localhost:3000"]
|
||||||
|
|
||||||
[memcached]
|
[memcached]
|
||||||
namespace="pastebin"
|
namespace="pastebin"
|
||||||
unique_namespace=true
|
unique_namespace=true
|
||||||
|
@ -33,22 +36,23 @@ weight="2.5"
|
||||||
# weight="1.0"
|
# weight="1.0"
|
||||||
|
|
||||||
[announce]
|
[announce]
|
||||||
host="localhost"
|
host="192.168.196.2"
|
||||||
port="1784"
|
port="1784"
|
||||||
protocol="perlbot"
|
protocol="perlbot"
|
||||||
|
|
||||||
[announce.channels]
|
[announce.channels]
|
||||||
"localhost:perlbot:#perl"="Freenode #perl"
|
"192.168.32.1:perlbot:#perl"="Freenode #perl"
|
||||||
"localhost:perlbot:#perl6"="Freenode #perl6"
|
"192.168.32.1:perlbot:#perl6"="Freenode #perl6"
|
||||||
"localhost:perlbot:#web"="Freenode #web"
|
"192.168.32.1:perlbot:#web"="Freenode #web"
|
||||||
"localhost:perlbot:#web-social"="Freenode #web-social"
|
"192.168.32.1:perlbot:#web-social"="Freenode #web-social"
|
||||||
"localhost:perlbot:#perlcafe"="Freenode #perlcafe"
|
"192.168.32.1:perlbot:#perlcafe"="Freenode #perlcafe"
|
||||||
"localhost:perlbot:#perlbot"="Freenode #perlbot"
|
"192.168.32.1:perlbot:#perlbot"="Freenode #perlbot"
|
||||||
"localhost:perlbot:##botparadise"="Freenode ##botparadise"
|
"192.168.32.1:perlbot:##botparadise"="Freenode ##botparadise"
|
||||||
"localhost:perlbot:#buubot"="Freenode #buubot"
|
"192.168.32.1:perlbot:#buubot"="Freenode #buubot"
|
||||||
"localhost:perlbot:#marpa"="Freenode #marpa"
|
"192.168.32.1:perlbot:#marpa"="Freenode #marpa"
|
||||||
"localhost:perlbot:#cobol"="Freenode #cobol"
|
"192.168.32.1:perlbot:#cobol"="Freenode #cobol"
|
||||||
"localhost:perlbot-magnet:#perl"="irc.perl.org #perl"
|
"192.168.32.1:perlbot-magnet:#perl"="irc.perl.org #perl"
|
||||||
"localhost:perlbot-magnet:#perl-help"="irc.perl.org #perl-help"
|
"192.168.32.1:perlbot-magnet:#perl-help"="irc.perl.org #perl-help"
|
||||||
"localhost:perlbot-oftc:#perl"="OFTC #perl"
|
"192.168.32.1:perlbot-magnet:#win32"="irc.perl.org #win32"
|
||||||
"localhost:perlbot-oftc:#perlbot"="OFTC #perlbot"
|
"192.168.32.1:perlbot-oftc:#perl"="OFTC #perl"
|
||||||
|
"192.168.32.1:perlbot-oftc:#perlbot"="OFTC #perlbot"
|
||||||
|
|
|
@ -20,6 +20,8 @@ use App::Model::Languages;
|
||||||
sub startup {
|
sub startup {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
|
$self->config($cfg->{mojolicious});
|
||||||
|
|
||||||
$self->plugin('tt_renderer' => {
|
$self->plugin('tt_renderer' => {
|
||||||
template_options => {
|
template_options => {
|
||||||
PRE_CHOMP => 1,
|
PRE_CHOMP => 1,
|
||||||
|
|
|
@ -35,7 +35,7 @@ sub get_eval {
|
||||||
print "Entering\n";
|
print "Entering\n";
|
||||||
|
|
||||||
if (@$langs == 1 && $langs->[0] eq "evalall") {
|
if (@$langs == 1 && $langs->[0] eq "evalall") {
|
||||||
$langs = [qw/perl perl5.26 perl5.24 perl5.22 perl5.20 perl5.18 perl5.16 perl5.14 perl5.12 perl5.10 perl5.8 perl5.6/];
|
$langs = [qw/perl perl5.28 perl5.26 perl5.26t perl5.24 perl5.22 perl5.20 perl5.18 perl5.16 perl5.14 perl5.12 perl5.10 perl5.8 perl5.6/];
|
||||||
}
|
}
|
||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
@ -153,6 +153,7 @@ sub get_eval_reader {
|
||||||
|
|
||||||
if ($type eq 'Warning') {
|
if ($type eq 'Warning') {
|
||||||
push @{$warnings{$seq}}, $message->message;
|
push @{$warnings{$seq}}, $message->message;
|
||||||
|
$futures{$seq}->done($message->message);
|
||||||
} elsif ($type eq 'EvalResponse') {
|
} elsif ($type eq 'EvalResponse') {
|
||||||
print "Got eval response for $seq\n";
|
print "Got eval response for $seq\n";
|
||||||
my $output = $message->get_contents;
|
my $output = $message->get_contents;
|
||||||
|
|
|
@ -6,7 +6,7 @@ use warnings;
|
||||||
use Mojo::Base '-base';
|
use Mojo::Base '-base';
|
||||||
|
|
||||||
my @langs = (
|
my @langs = (
|
||||||
{name => "perl5.26", mode => "perl", description => "Perl 5.26"},
|
{name => "perl5.28", mode => "perl", description => "Perl 5.28"},
|
||||||
{name => "perl6", mode => "perl", description => "Rakudo Star / Perl 6"},
|
{name => "perl6", mode => "perl", description => "Rakudo Star / Perl 6"},
|
||||||
{name => "ruby", mode => "ruby", description => "Ruby (2.1)"},
|
{name => "ruby", mode => "ruby", description => "Ruby (2.1)"},
|
||||||
{name => "javascript", mode => "javascript", description => "Javascript/Node.js"},
|
{name => "javascript", mode => "javascript", description => "Javascript/Node.js"},
|
||||||
|
@ -17,6 +17,8 @@ my @langs = (
|
||||||
{name => "perl", mode => "perl", description => "Perl 5 (blead/git)"},
|
{name => "perl", mode => "perl", description => "Perl 5 (blead/git)"},
|
||||||
{name => "deparse", mode => "perl", description => "Deparsed Perl"},
|
{name => "deparse", mode => "perl", description => "Deparsed Perl"},
|
||||||
{name => "evalall", mode => "perl", description => "Perl (EvalAll)"},
|
{name => "evalall", mode => "perl", description => "Perl (EvalAll)"},
|
||||||
|
{name => "perl5.26", mode => "perl", description => "Perl 5.26"},
|
||||||
|
{name => "perl5.26t", mode => "perl", description => "Perl 5.26 (Threaded)"},
|
||||||
{name => "perl5.24", mode => "perl", description => "Perl 5.24"},
|
{name => "perl5.24", mode => "perl", description => "Perl 5.24"},
|
||||||
{name => "perl5.22", mode => "perl", description => "Perl 5.22"},
|
{name => "perl5.22", mode => "perl", description => "Perl 5.22"},
|
||||||
{name => "perl5.20", mode => "perl", description => "Perl 5.20"},
|
{name => "perl5.20", mode => "perl", description => "Perl 5.20"},
|
||||||
|
|
|
@ -13,8 +13,8 @@ sub announce {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($channel, $who, $what, $link) = @_;
|
my ($channel, $who, $what, $link) = @_;
|
||||||
|
|
||||||
my $socket = IO::Socket::INET->new( PeerAddr => $self->config->{server} //'localhost', PeerPort => $self->config->{port} //1784 )
|
my $socket = IO::Socket::INET->new( PeerAddr => $self->config->{host}, PeerPort => $self->config->{port} )
|
||||||
or die "error: cannot connect to announce server";
|
or die "error: cannot connect to announce server: $! ".$self->config->{host} . ":" .$self->config->{port};
|
||||||
|
|
||||||
print $socket "$channel\x1E$link\x1E$who\x1E$what\n";
|
print $socket "$channel\x1E$link\x1E$who\x1E$what\n";
|
||||||
close($socket);
|
close($socket);
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -37,18 +37,18 @@
|
||||||
|
|
||||||
// fuck parsing the hostname
|
// fuck parsing the hostname
|
||||||
var servers = {
|
var servers = {
|
||||||
"f.perlbot.pl": "localhost:perlbot:",
|
"f.perlbot.pl": "192.168.32.1:perlbot:",
|
||||||
"freenode.perlbot.pl": "localhost:perlbot:",
|
"freenode.perlbot.pl": "192.168.32.1:perlbot:",
|
||||||
"m.perlbot.pl": "localhost:perlbot-magnet:",
|
"m.perlbot.pl": "192.168.32.1:perlbot-magnet:",
|
||||||
"magnet.perlbot.pl": "localhost:perlbot-magnet:",
|
"magnet.perlbot.pl": "192.168.32.1:perlbot-magnet:",
|
||||||
"o.perlbot.pl": "localhost:perlbot-oftc:",
|
"o.perlbot.pl": "192.168.32.1:perlbot-oftc:",
|
||||||
"oftc.perlbot.pl": "localhost:perlbot-oftc:",
|
"oftc.perlbot.pl": "192.168.32.1:perlbot-oftc:",
|
||||||
"f.perl.bot": "localhost:perlbot:",
|
"f.perl.bot": "192.168.32.1:perlbot:",
|
||||||
"freenode.perl.bot": "localhost:perlbot:",
|
"freenode.perl.bot": "192.168.32.1:perlbot:",
|
||||||
"m.perl.bot": "localhost:perlbot-magnet:",
|
"m.perl.bot": "192.168.32.1:perlbot-magnet:",
|
||||||
"magnet.perl.bot": "localhost:perlbot-magnet:",
|
"magnet.perl.bot": "192.168.32.1:perlbot-magnet:",
|
||||||
"o.perl.bot": "localhost:perlbot-oftc:",
|
"o.perl.bot": "192.168.32.1:perlbot-oftc:",
|
||||||
"oftc.perl.bot": "localhost:perlbot-oftc:",
|
"oftc.perl.bot": "192.168.32.1:perlbot-oftc:",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (channel && servers[hostname]) { // only do this if we have a channel and a valid server
|
if (channel && servers[hostname]) { // only do this if we have a channel and a valid server
|
||||||
|
|
|
@ -74,8 +74,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
[% IF eval.keys.size == 0 %]
|
[% IF eval.keys.size == 0 || !eval.keys.size.defined %]
|
||||||
ZERO
|
|
||||||
[% ELSIF eval.keys.size == 1 %]
|
[% ELSIF eval.keys.size == 1 %]
|
||||||
<div id="eval" class="col-md-12">
|
<div id="eval" class="col-md-12">
|
||||||
<h3>Program Output</h3>
|
<h3>Program Output</h3>
|
||||||
|
|
Loading…
Add table
Reference in a new issue