From ecbb38029e3cb16001108c52d01d98da8f6bbc30 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Tue, 22 May 2018 03:25:43 -0400 Subject: [PATCH] Fix to new setup --- app.cfg | 30 +++++++++++++++--------------- lib/App/Model/Perlbot.pm | 4 ++-- static/favicon.ico | Bin 1150 -> 2686 bytes templates/editor.html | 24 ++++++++++++------------ 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/app.cfg b/app.cfg index 91d1fd4..6343748 100644 --- a/app.cfg +++ b/app.cfg @@ -33,22 +33,22 @@ 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-oftc:#perl"="OFTC #perl" +"192.168.32.1:perlbot-oftc:#perlbot"="OFTC #perlbot" 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 26344a4cd7313816a4314863744a627e5c4f4328..6cefe01b628168e4aad78c2adef1a5e0140fe256 100644 GIT binary patch literal 2686 zcmeHHJ$mIJ3>17@Z3Qm22C6;AJI)@%H-DLt5I=rSQYFoX#C}Mlkp=-43HWIDjwomIuEAN2+kabB-2YLQY4ksNx0bM>=>p zh-kg8SDlJmK`6llQPB{4!)v-a{}m75X$7`#U5_RxI7B5X;c0{d?S!BhD{Kwo4qy?&E~0qOm+OH82RDU>6o4Va zB|$ro6aSzhJ7e|&jaN*m%)=BrULjxI+8w|nQ+~OlkK?2tgPVxSzm>n7FyOlRYm%w1e_VHwE6k4@ z>@{G6iK`gbv0qMYpW>cjXY*Uv7yG*L;Ne^1_+0XwS?HCbm+qct(lvq4_UZ~NCfpq}sQ Uf9~MyeVu^EQ2iCQvGk<(4c835xc~qF 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