use Net::IRC; my $irc = new Net::IRC; my $conn = $irc->newconn( Server => 'irc.xelium.org', Port => '6667', Nick => 'TestBot', Ircname => 'This is a test bot.', Username => 'TestBot' ); $conn->{channel} = '#KefkasTower'; sub on_connect { my $conn = shift; $conn->join($conn->{channel}); $conn->privmsg('NickServ', 'IDENTIFY *********'); $conn->{connected} = 1; } $conn->add_handler('376', \&on_connect); $irc->start;