Setting block enables command blocking. That is it is possible to match up
server output with a command issued. Note all output is contained within the
block even if it's output caused by the command (such as gin messages).
Essentially block encapsulates all information until the command returns to
After iset block is issued it will no longer be possible to issue normal
commands to the server. They must be prefixed with a number followed by a
space. This is the command identifier. The value 0 is reserved. Normally an
interface should start at 1 and then work up to a higher number. Since the
value takes up more space the higher it is, it should be wrapped at 10 so
only 1 byte of data is needed to be output.
1 shout hi
Issues 'shout hi' to the server and marks it as command 1.
When the output is shown it will look like this:
This will be followed by:
<command code><BLOCK_SEPARATOR><command output><BLOCK_END>
Thus it is easy to match up server output with the command using this
There are several command codes for special cases:
BLK_NULL - no command was sent
BLK_GAME_MOVE - a game move was recognized
BLK_ERROR_BADCOMMAND - the command was not recognized
BLK_ERROR_BADPARAMS - bad parameters were given
BLK_ERROR_AMBIGUOUS - the command was ambiguous
BLK_ERROR_RIGHTS - insufficient rights
BLK_ERROR_OBSOLETE - obsolete command
BLK_ERROR_REMOVED - removed / temporarily disabled
BLK_ERROR_NOTPLAYING - a move and there is no game in progress
BLK_ERROR_NOSEQUENCE - no command identifier was found (client error)
BLK_ERROR_LENGTH - the command was too long
BLK_NULL and BLK_ERROR_NOSEQUENCE will not produce any command output
Unfortunately due to the way the server works it is not possible to separate
off usage errors when the command itself verifies parameters. In this case it
will appear the server has put the usage information as command output. This
may be fixed in future by another ivariable and some sort of extra mark.
It is possible for admins and bots to execute commands for users and for
some commands to call other commands. This is termed 'posing'. A pose can be
detected because POSE_START is seen (the command identifier is 0) which may
appear inside of the command output (before BLOCK_END is detected). The posed
command is marked as ended by a POSE_END. A number of these may recursively
stack. Inside the POSE_START and END marks there will be output as described
above. The cases where commands call other commands are being purged from the
system, but a number still remain. POSE_START may be seen outside of a
command when an admin or bot is causing a command to be executed.
<BLOCK_START><command identifier><BLOCK_SEPARATOR><command code>
... <BLOCK SEPARATOR><command output><POSE_START><BLOCK_START>0
... <BLOCK_SEPARATOR><command output><BLOCK_END><POSE_END><command output>
Note blocking is currently not compatible with Timeseal. Timeseal will be
later re-released to allow for this mode to be used. Therefore this is only
of interest to bot authors.
The list of codes that FICS currently uses can be seen in 'help block_codes'.
Admin command codes are not shown but serious authors can request them.
See Also: block_codes iset ivariables
[Last modified: August 3rd, 2000 -- DAV]
Sun Feb 11 14:27:58 GMT Standard Time 2007