diff --git a/app.cfg b/app.cfg index 91d1fd4..4f2ae0a 100644 --- a/app.cfg +++ b/app.cfg @@ -3,6 +3,9 @@ memcached=true evalserver=true blogspam=false +[mojolicious.hypnotoad] +listen=["http://localhost:3000"] + [memcached] namespace="pastebin" unique_namespace=true @@ -33,22 +36,23 @@ weight="2.5" # weight="1.0" [announce] -host="localhost" +host="192.168.196.2" port="1784" protocol="perlbot" [announce.channels] -"localhost:perlbot:#perl"="Freenode #perl" -"localhost:perlbot:#perl6"="Freenode #perl6" -"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:#marpa"="Freenode #marpa" -"localhost:perlbot:#cobol"="Freenode #cobol" -"localhost:perlbot-magnet:#perl"="irc.perl.org #perl" -"localhost:perlbot-magnet:#perl-help"="irc.perl.org #perl-help" -"localhost:perlbot-oftc:#perl"="OFTC #perl" -"localhost:perlbot-oftc:#perlbot"="OFTC #perlbot" +"192.168.32.1:perlbot:#perl"="Freenode #perl" +"192.168.32.1:perlbot:#perl6"="Freenode #perl6" +"192.168.32.1:perlbot:#web"="Freenode #web" +"192.168.32.1:perlbot:#web-social"="Freenode #web-social" +"192.168.32.1:perlbot:#perlcafe"="Freenode #perlcafe" +"192.168.32.1:perlbot:#perlbot"="Freenode #perlbot" +"192.168.32.1:perlbot:##botparadise"="Freenode ##botparadise" +"192.168.32.1:perlbot:#buubot"="Freenode #buubot" +"192.168.32.1:perlbot:#marpa"="Freenode #marpa" +"192.168.32.1:perlbot:#cobol"="Freenode #cobol" +"192.168.32.1:perlbot-magnet:#perl"="irc.perl.org #perl" +"192.168.32.1:perlbot-magnet:#perl-help"="irc.perl.org #perl-help" +"192.168.32.1:perlbot-magnet:#win32"="irc.perl.org #win32" +"192.168.32.1:perlbot-oftc:#perl"="OFTC #perl" +"192.168.32.1:perlbot-oftc:#perlbot"="OFTC #perlbot" diff --git a/lib/App.pm b/lib/App.pm index 3fa6c13..fbd1f85 100644 --- a/lib/App.pm +++ b/lib/App.pm @@ -20,6 +20,8 @@ use App::Model::Languages; sub startup { my $self = shift; + $self->config($cfg->{mojolicious}); + $self->plugin('tt_renderer' => { template_options => { PRE_CHOMP => 1, diff --git a/lib/App/Model/Eval.pm b/lib/App/Model/Eval.pm index 296c9d1..46ddf7b 100644 --- a/lib/App/Model/Eval.pm +++ b/lib/App/Model/Eval.pm @@ -35,7 +35,7 @@ sub get_eval { print "Entering\n"; 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; @@ -153,6 +153,7 @@ sub get_eval_reader { if ($type eq 'Warning') { push @{$warnings{$seq}}, $message->message; + $futures{$seq}->done($message->message); } elsif ($type eq 'EvalResponse') { print "Got eval response for $seq\n"; my $output = $message->get_contents; diff --git a/lib/App/Model/Languages.pm b/lib/App/Model/Languages.pm index e2b8e41..1aa650f 100644 --- a/lib/App/Model/Languages.pm +++ b/lib/App/Model/Languages.pm @@ -6,7 +6,7 @@ use warnings; use Mojo::Base '-base'; 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 => "ruby", mode => "ruby", description => "Ruby (2.1)"}, {name => "javascript", mode => "javascript", description => "Javascript/Node.js"}, @@ -17,6 +17,8 @@ my @langs = ( {name => "perl", mode => "perl", description => "Perl 5 (blead/git)"}, {name => "deparse", mode => "perl", description => "Deparsed Perl"}, {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.22", mode => "perl", description => "Perl 5.22"}, {name => "perl5.20", mode => "perl", description => "Perl 5.20"}, diff --git a/lib/App/Model/Perlbot.pm b/lib/App/Model/Perlbot.pm index 44763a5..08f992f 100644 --- a/lib/App/Model/Perlbot.pm +++ b/lib/App/Model/Perlbot.pm @@ -13,8 +13,8 @@ sub announce { my $self = shift; my ($channel, $who, $what, $link) = @_; - my $socket = IO::Socket::INET->new( PeerAddr => $self->config->{server} //'localhost', PeerPort => $self->config->{port} //1784 ) - or die "error: cannot connect to announce server"; + my $socket = IO::Socket::INET->new( PeerAddr => $self->config->{host}, PeerPort => $self->config->{port} ) + or die "error: cannot connect to announce server: $! ".$self->config->{host} . ":" .$self->config->{port}; print $socket "$channel\x1E$link\x1E$who\x1E$what\n"; close($socket); diff --git a/static/favicon.ico b/static/favicon.ico index 26344a4..6cefe01 100644 Binary files a/static/favicon.ico and b/static/favicon.ico differ diff --git a/templates/editor.html b/templates/editor.html index aa16edd..001b3f3 100755 --- a/templates/editor.html +++ b/templates/editor.html @@ -37,18 +37,18 @@ // fuck parsing the hostname var servers = { - "f.perlbot.pl": "localhost:perlbot:", - "freenode.perlbot.pl": "localhost:perlbot:", - "m.perlbot.pl": "localhost:perlbot-magnet:", - "magnet.perlbot.pl": "localhost:perlbot-magnet:", - "o.perlbot.pl": "localhost:perlbot-oftc:", - "oftc.perlbot.pl": "localhost:perlbot-oftc:", - "f.perl.bot": "localhost:perlbot:", - "freenode.perl.bot": "localhost:perlbot:", - "m.perl.bot": "localhost:perlbot-magnet:", - "magnet.perl.bot": "localhost:perlbot-magnet:", - "o.perl.bot": "localhost:perlbot-oftc:", - "oftc.perl.bot": "localhost:perlbot-oftc:", + "f.perlbot.pl": "192.168.32.1:perlbot:", + "freenode.perlbot.pl": "192.168.32.1:perlbot:", + "m.perlbot.pl": "192.168.32.1:perlbot-magnet:", + "magnet.perlbot.pl": "192.168.32.1:perlbot-magnet:", + "o.perlbot.pl": "192.168.32.1:perlbot-oftc:", + "oftc.perlbot.pl": "192.168.32.1:perlbot-oftc:", + "f.perl.bot": "192.168.32.1:perlbot:", + "freenode.perl.bot": "192.168.32.1:perlbot:", + "m.perl.bot": "192.168.32.1:perlbot-magnet:", + "magnet.perl.bot": "192.168.32.1:perlbot-magnet:", + "o.perl.bot": "192.168.32.1: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 diff --git a/templates/viewer.html b/templates/viewer.html index 5ee0241..c66754c 100755 --- a/templates/viewer.html +++ b/templates/viewer.html @@ -74,8 +74,7 @@