use Moose;
+use POE::Component::IRC::Common qw/irc_to_utf8/;
use POE::Session;
use POE::Component::IRC::Plugin::Logger;
use POE::Component::IRC::Plugin::BotTraffic;
));
$heap->{connector} = POE::Component::IRC::Plugin::Connector->new(
- servers => ['irc.netgamers.org', 'underworld.no.eu.netgamers.org'
- ,'firefly.no.eu.netgamers.org', 'underworld.ca.us.netgamers.org' ]
+ servers => [['irc.netgamers.org'], ['underworld.no.eu.netgamers.org']
+ ,['firefly.no.eu.netgamers.org'], ['underworld.ca.us.netgamers.org'] ]
);
$irc->plugin_add( 'Connector' => $heap->{connector} );
$disp->load(@commands);
}
- my $channels = new IO::File 'channels';
+ my $channels = new IO::File 'channels' or die $!;;
while (<$channels>){
my ($chan, @types) = split /\s+/;
say "$chan - @types";
}
sub irc_invite {
- my ($self,$sender, $who, $channel) = @_[OBJECT,SENDER, HEAP, ARG0 .. ARG1];
+ my ($self,$sender, $who, $channel) = @_[OBJECT,SENDER, ARG0 .. ARG1];
my $irc = $sender->get_heap();
$irc->yield( join => $_ ) for grep /^$channel$/i, keys %{$self->disp->channels}
}
sub irc_public {
+ $_[ARG2] = irc_to_utf8 $_[ARG2];
}
sub irc_msg {
+ $_[ARG2] = irc_to_utf8 $_[ARG2];
}
sub refresh {