Disable nested execute. The execute protocol is flawed and cannot be

implemented correctly by asynchronous clients --- unless a client
waits for a prompt after sending the execute command and its argument,
it is prone to send more input before the C_EXECUTE arrives.  That
input overtakes the contents of the script file.  This is almost
certain to happen when the execute is in a script file.  Disabling
that is probably more useful and certainly less painful than
documenting this mess.  The client rejects nested execute since
servcmd.c rev. 1.42.
(EXEC): new.
(player_coms): Require it for execute.
(player_set_nstat): Set it in nstat.
(execute): Clear it in nstat.
This commit is contained in:
Markus Armbruster 2007-12-09 17:24:30 +00:00
parent ed8e0cd552
commit adfab4344e
4 changed files with 5 additions and 1 deletions

View file

@ -100,7 +100,7 @@ struct cmndstr player_coms[] = {
0, edit, C_MOD, GOD},
{"enable", 0, enab, C_MOD, GOD},
{"enlist <SECTS> <NUM>", 2, enli, C_MOD, NORM + MONEY + CAP},
{"execute <INPUT FILE>", 0, execute, 0, VIS},
{"execute <INPUT FILE>", 0, execute, 0, VIS + EXEC },
{"explore <c|m> <SECT> <NUM> <PATH|DESTINATION>",
1, explore, C_MOD, NORM + MONEY + CAP},
{"financial", 0, fina, 0, NORM},