Each connection to Hamster's Remote Control Server starts in "Telnet Mode". The protocol for this mode is not described here in detail, but it is very similar to NNTP (RFC-977). The available commands and possible response codes are described below.
AUTH [-SIMPLE] <username> <password>
Login with given username and password.
AUTH -SASL <mechanism> [<parameters>]
Login with given SASL mechanism.
Supported mechanisms are: CRAM-SHA1 CRAM-MD5, PLAIN, LOGIN
HELP [<command>]
Return description for the given command. If no command is given, a list of available commands is returned.
QUIT
Logout and terminate connection.
LIVE ON [ENCRYPT]
Leaves "Telnet Mode" and enters "Live Mode".
LIVE REQUEST <code>
Executes a "Live Mode" request in "Telnet Mode".
Request <code> has to be given as 4 hex digits (e. g. "LIVE
REQUEST 2030"), its params in the following lines up to a line
containing only a single dot.
Result line starts with 3-digit response code (200=success), a
single space and the 4-digit Live reply code (e. g. "200 4000 Ok,
data follows", "400 4201 Failed"). On success, reply
data follows immediately up to a line containing only a single dot.
> LIVE REQUEST 2030
< 300 Ok, send parameters
> .
< 200 4000 Ok, data follows
< ta=0
< jo=0
< [...]
< by=0
< .
LOG LIST [-S <size>] [-P <pattern>]
Returns the final part of the current log file.
If "-S <size>" is given, it's the requested size in KB (default: 8).
If "-P <pattern>" is given, only lines matching this regex pattern are returned.
LOG ROTATE
Starts a new log file.
NEWS ADD GROUP <groupname>
NEWS DEL GROUP <groupname>
Adds/deletes the newsgroup with the given name.
NEWS ADD PULL <groupname> <servername>
NEWS DEL PULL <groupname> <servername>
Adds/deletes the news-pull for the given group on the given server..
NEWS LIST GROUP [-P <pattern>]
NEWS LIST PULL [-P <pattern>]
Returns the list of active newsgroups/news-pulls.
If "-P <pattern>" is given, only lines matching this regex
pattern are returned.
SCRIPT LIST [-P <pattern>]
Lists available script files.
If "-P <pattern>" is given, only lines matching this regex pattern are returned.
SCRIPT DIR [-P <pattern>]
Like SCRIPT LIST above, but with extended information:
Filetime TAB Filesize TAB [Path\]Filename
SCRIPT START [-W] <scriptname> [<scriptpars>]
Starts the given script with given parameters.
If "-W" is given, control does not return until the started script has finished. In this case, all script output is also sent.
SCRIPT STOP
Stop all running scripts.
SCRIPT GET <scriptname>
Sends the content of the given script file.
SCRIPT PUT <scriptname>
Stores the text following this command under the given script filename on the server.
SCRIPT DEL <scriptname>
Deletes the given script on the server.
MSG DIR
Lists local ans outgoing message files with extended information:
Filetime TAB Filesize TAB [Path\]Filename
MSG GET <messagename>
Sends the full content of the given message file.
MSG GETSHORT <messagename>
Sends the first 300 lines of the given message file.
MSG PUT <messagename>
Stores the text following this command under the given message filename on the server.
MSG DEL <messagename>
Deletes the given message on the server.
MSG REQUEUE <messagename>
Requeues the given message on the server.
This will change a message .err to .msg extension or move an article
from News.Err to News.Out (or their equivalent).
SERVER LIST
Lists all local servers with their current states.
SERVER (STATE|START|STOP|RESTART) (NNTP|POP3|SMTP|RECO)
Gets or changes the state of the given local server.
TASK LIST [-P <pattern>]
Returns the current list of active tasks.
If "-P <pattern>" is given, only lines matching this regex pattern are returned.
USER PASSWORD <newpass1> <newpass2>
Change password, which has to be given twice.
R_INFO = 100;
R_OK0 = 200;
R_OK1 = 201;
R_AUTHOK = 280;
R_SENDDATA = 300;
R_AUTHCHLG = 380;
R_FAILED0 = 400;
R_FAILED1 = 401;
R_AUTHREQ = 480;
R_SYNTAX = 500;
R_UNKNOWN = 501;
R_NOPERM = 502;
R_SYSERR = 503;
R_AUTHFAIL = 580;