$_[KERNEL]->post( $heap->{ 'ircobject' }->session_id(), "privmsg", "nickserv", "identify ".$self->{ "password" } );
}
print( "IRC : Connected to irc://".$self->{ "host" }."/".$self->{ "channel" }."\n" );
- for my $chan (split( / /, $self->{ "channel" } )) {
+ for my $chan (split( /,/, $self->{ "channel" } )) {
$_[KERNEL]->post( $heap->{ 'ircobject' }->session_id(), "join", $chan );
}
}
sub send_public {
my( $kernel, $heap, $msg ) = @_[ KERNEL, HEAP, ARG0 ];
- local( $Text::Wrap::columns = 354 );
- my @msg = split( /\n/, wrap( '', '', $msg ) );
- for( @msg ) {
- $kernel->post( $heap->{ 'ircobject' }->session_id(), "privmsg", $self->{ "channel" }, $_ );
+ for my $chan (split( /,/, $self->{ "channel" } ) ) {
+ $kernel->yield( "send_public_to", $msg, $chan );
}
- print( "IRC : =>".$self-{ "channel" }.": $msg\n" );
}
sub send_public_to {