my $stdout = AnyEvent::Handle->new (fh => \*STDOUT);
my $con = new AnyEvent::IRC::Client;
-my $pub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT}, on_error => sub { confess @_ } );
my $sub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT}, on_error => sub { confess @_ } );
$sub->psubscribe( 'channel *', sub {
if ( $msg->{command} eq 'PRIVMSG' ) {
my $channel = join(' ', 'channel', $msg->{params}->[0], $msg->{prefix});
+ my $pub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT}, on_error => sub { confess @_ } );
$pub->publish( $channel, $msg->{params}->[1] );
} elsif ( $msg->{command} eq 'MODE' ) {
$con->send_srv( JOIN => $room );