mirror of
https://github.com/perlbot/perlbuut-pastebin
synced 2025-06-07 06:06:23 -04:00
Fix to new setup
This commit is contained in:
parent
37a12c12ee
commit
ecbb38029e
4 changed files with 29 additions and 29 deletions
30
app.cfg
30
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"
|
||||
|
|
|
@ -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);
|
||||
|
|
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
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue