}
}
+PART: |-
+ sub {
+ my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;
+ if( $what =~ /^[#&][^ ,]+$/ ) {
+ $kernel->post( "mod_irc", "do_part", $what );
+ $kernel->post( $src, $replypath, "Okay.", $dest );
+ } else {
+ $kernel->post( $src, $replypath, "'$what' is not a valid channel name.", $dest );
+ }
+ }
+
IGNORE: |-
sub {
my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;
send_public_to => \&send_public_to,
do_abort => \&do_abort,
do_join => \&do_join,
+ do_part => \&do_part,
do_mode => \&do_mode,
watchdog => \&watchdog,
},
}
}
+sub do_part {
+ my( $kernel, $heap, $what ) = @_[ KERNEL, HEAP, ARG0 ];
+ if( $what =~ /^[#&][^ ,]+$/ ) {
+ $kernel->post( $heap->{ 'ircobject' }->session_id(), "part", $what );
+ } else {
+ warn( "'$what' is an invalid channel name" );
+ }
+}
+
sub do_abort {
my( $kernel, $heap ) = @_[ KERNEL, HEAP ];
$heap->{ 'ircobject' }->{ 'send_queue' } = [];