A patch to improve the server command line - rp@xxxxxxxxxx Patch against the May 22 CVS snapshot. This patch provides the ability for civclients to execute server commands. Every line that starts with '/' is interpreted as a server command. The resulting output is written both to the client chatline and to the server command line. The patch works fine with regular 1.8.0 clients, but patched clients have a new Help->Chatline menu option explaining the feature, and a new Game->Message Option item to filter the output. (Don't enable popups, each line of output will appear in a separate popup window!) The following changes were made to the server: + chatlines from clients starting with '/' are interpreted as commands + commands may be prefixed with '/' on the server cmdline (for consistency) + commands issued by clients are echoed on the server command line + command names can be abbreviated; when ambiguous, a warning is issued + 'show optionname' works as expected now + with 'show', the status of options is shown in a different way + command output still fits into 80 columns (uneasily) + setting the AI level now provides feedback in all cases + a new command, 'cmdlevel', is used to control access to commands Before the game starts, command levels cannot be assigned to individual players; this is something to rectify in a later version. There are four access levels: 'none', 'info', 'ctrl', and 'hack'. With 'none', the default, no commands are allowed from civclients at all. With 'info', only informational commands are allowed. With 'ctrl', commands are allowed that can be used to control the game, including starting the game, removing or adding players, and setting options. The 'hack' level allows all commands, including the ones that read or write files. For example, the 'save' command can be used to overwrite arbitrary files. The 'ctrl' level allows hosts to be operated without direct access to the server command line prompt, but some refinements are needed to make this a viable option in practice. There may be a need for better documentation of this mechanism. Until we have a /help cmdlevel command, I don't know where to put it. %----------------------------------------------------------------------------% CHANGES between May 14 and May 22 version: + just send E_SVR_CMD_FDBK event even to clients who don't know it (this works, but it generates 'unknown event type' messages with unpatched clients) (but it doesn't require a "clientcommands" capability) + cc: commands, not results, to the server console + remove command: before server output + notify metastring change to all players + crammed /show output on server into 80 rows (by brute force) + fixed the 'Try /help' string + improved '/explain