- my $channel = join(' ', 'channel', $msg->{params}->[0], $msg->{prefix});
- $pub->publish( $channel, $msg->{params}->[1] );
+ my ( $to, $body ) = @{ $msg->{params} };
+ my $channel = join(' ', 'MSG', "$nick/$to", $msg->{prefix});
+ warn "#Q>> $channel | $body\n";
+ my $pub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT}, on_error => sub { confess @_ } );
+ $pub->publish( $channel, $body );