Chess::ICClib is a Perl interface to Internet Chess Server commands.
SYNOPSIS
use Chess::ICClib;
my $icc = Chess::ICClib->new([-prompt=>$ICC],
[-host=>$host,-port=>$port]
[-user=>$user,-pass=>$password]);
$icc->ICCCommand("finger romm");
Chess::ICClib - Perl interface to Internet Chess Server commands. Provides a tool able to connect, login and send commands to an Internet Chess Server as well as return responses from the server. Can be used as a basis for information retrieval tool as well as for a player or a chess program interface.
Since ICS [Internet Chess Server] (any, commercial and free alike) are built upon the telnet protocol, this module is built upon the Net::Telnet module where the telnet connection serves as the read/write socket.
This module has been tested against ICC (Internet Chess Club, http://www.chessclub.com, telnet king.chessclub.com 5000) but it should work fine against other chess servers unless they propose another "more" preprompt. More about prompts see in ICCCommand method section.
The following methods are available:
Constructor
$icc = Chess::ICClib->new([-prompt=>$ICC], [-host=>$host,-port=>$port] [-user=>$user,-pass=>$password]);
Creates an ICC object, then connects and logins into the ICS. All parameters are optional.
-prompt
The ICS prompt. The default is the ICC prompt 'aics%'. Several other popular servers' prompt are provided - see the EXPORT section.
-host,-port
The ICS host and port. The defaults are the ICC host 204.178.125.65 and the ICC port 5000. In later versions hosts and ports for most popular ICS will be added for export.
-user,-pass
The ICS user name and password. There are no defaults. 'guest' login is sufficient on most of the servers (USChessLive and FreeICS are not supporting guest logins!) The module tries to look up the file '~/.icsrc' to read the username and password from it.
ICCCommand
my $response = $icc->ICCCommand($icccommand)
This method performs an ICC Command $icccommand and sets the output into $response. The interface of ICC (and supposedly of other ICS) pages the output automatically with preprompt 'Type "more" to see more' and the output unpages it scrolling with issuing the "more" command consecutively until the preprompt disappears. Please note that ICS is case-insensitive while Perl is.
Product's homepage
Requirements:
· Perl