PogoBOT::Interface - Encapsulates the PogoBOT protocol
use PogoBOT::Interface;
my $bot = new PogoBOT::Interface;
$bot->register_cmd( 'hello', \&hello_world );
$bot->register_cleanup( sub{ print "Cleaning up 'hello' routine.\n" } );
$bot->start;
sub hello_world {
return "Hello, World!";
}
Simplifies writing modules that connect to bots implementing the PogoBOT protocol.
Can optionally be passed an array of argument pairs: host => $host to set the hostname to connect to, port => $port to set the port to connect to.
By default the interface will attempt to connect to port 2112 on localhost.
Takes no arguments, and does not return.
register_cleanup($subref)
Tim Retout <tim@retout.co.uk> and Laurence Hurst <laurence2@uwcs.co.uk>
Please report any bugs to the authors, who can usually be found in #compsoc on irc.uwcs.co.uk.
Copyright (C) 2005,2006 by the authors.