|
NAMEGames::Bingo::Bot - A simple class holding IRC related methods for bingoSYNOPSISuse Games::Bingo::Bot;use constant ANY => 1; use constant PUBLIC => 2; use constant PRIVATE => 3; my $gbb = Games::Bingo::Bot->new(); my $sub = $gbb->{'commands'}->{$msg}); my ($type, $answer) = &$sub($gbb, $nick); DESCRIPTIONThis module contains all the commands supported by the Games::Bingo::Bot IRC bot (see the script in the bin directory).The Games::Bingo::Bot class (this) and the script mentioned above is a complete IRC setup for playing Bingo, using the Games::Bingo module. These are the bingobot commands:
The command are described below in detail (SEE COMMANDS). Not implemented yet (SEE TODO):
All commands can be sent into the channel or send as private messages to the bot. The bot can repond as both of these ways aswell. The reponses are sent as follows:
As long as the bot is online a game is running. METHODSThese are the basic methods of the class.newThis is the constructor, it will start up a new game.get_subThis is the only method apart from the contructor new, which is not a implementation of a IRC related command.The method returns a CODEREF to the command asked for (SEE COMMANDS). COMMANDSAll these methods are implementations of commands which are supported by the IRC client.bingoThis is the command to be issued by a user, when he/she has bingo.This starts a check of the issuing players card. The method takes one argument, the nick of the player. The methods reponds publicly on success and privately when the player did not have a bingo. pullThis command issues the pulling of a new number.The method takes no arguments. The method responds publicly. showThis command shows the card of the player issuing the command.The method takes one argument, the nick of the player. The method reponds privately. statsThis command shows the current stats of the game.
The method takes no arguments. The method responds according to how it was called (publicly/privately). pulledThis method shows the numbers which have been pulled.The method takes no arguments. The method responds according to how it was called (publicly/privately). playThis method adds the issuing player to the current game.The method takes one argument, the nick of the player. The method responds according to how it was called (publicly/privately). partThis method deletes the issueing player from the current game.The method takes one argument, the nick of the player. The method responds according to how it was called (publicly/privately). auto*This is not yet implemented, please see the TODO*This is actually a simple accessor, enabling the autoflag of the game, meaning numbers are pulled automatically. The method takes no argument. The method responds according to how it was called (publicly/privately). noauto*This is not yet implemented, please see the TODO*This is actually a simple accessor, disabling the autoflag of the game, meaning numbers are no longer pulled automatically. The method takes no argument. The method responds according to how it was called (publicly/privately). helpThis is a simple list of the commands and a few guidelines, a reference manual so to speak.The method takes no argument. The method responds privately. SEE ALSO
TODO
AUTHORjonasbn <jonasbn@cpan.org>COPYRIGHTGames::Bingo::Bot and related scripts and modules are free software and is released under the Artistic License. See <http://www.perl.com/language/misc/Artistic.html> for details.Games::Bingo::Bot is (C) 2003 Jonas B. Nielsen (jonasbn) <jonasbn@cpan.org>
Visit the GSP FreeBSD Man Page Interface. |