using Bot::BasicBot with private channels

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

The attached Bot::BasicBot script, modified to protect some string
literals, works fine when connecting to servers using public channels,
including logging the first call to "say" sent to itself. Private
channels require an invitation request sent to an invite bot. In a
normal irc client I would type this to get the invitation:

/msg <botname> invite <username> <password>

To do this with BasicBot I called the "say" function on lines 30-34,
which are commented out in the attached script:

  body=>"invite username password"

The script appears to hang (I don't know for sure because I don't see
a way to report errors) with those lines un-commented and never logs
any messages as it does when connected to public channels and lines
30-34 commented out.

Does anyone have suggestions on how to obtain the invite properly?
Perhaps this functionality is not supported.
use warnings;
use strict;

package MyBot;
use base qw( Bot::BasicBot );

open FILE,">/path/to/log";

  server => 'uri',
  channels => [ '#channel'],
  port => '6667',
  nick => 'username'

sub connected {
  my $self = shift;
  #just to make sure this function was entered
    run => [print FILE "connecting\n"]
  #test by sending message to myself: works
    body=>"invite username password"
#invite required prior to connecting to #tv channel: does not work
#   $self->say(
#     channel=>"msg",
#     who=>"welcomebot",
#     body=>"invite username password"
#   );

sub said {
  my ($self,$message) = @_;
  my $who = $message->;
  my $raw_nick = $message->;
  my $channel = $message->;
  my $body = $message->;
  my $address = $message->;
  #for now just record a transcript of messages
  my $str = "who: $who nick: $raw_nick channel: $channel body: $body
address: $address\n";
    run => [print FILE $str]

Site Timeline