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.
because the server doesn't send C_PROMPT. The client simply rejects
such redirections since servcmd.c rev. 1.42. Before it didn't, but
incorrectly extended the redirection until the end of the script, and
screwed up when there was more than one redirection in the execute.
Make the server reject such redirections as well, because that's
probably more useful and certainly less painful than documenting this
mess.
not used with new autoconf. Replace with INSTANCE
for logs, build directory for local patches.
Use the local patches directly from the source tree instead
of all local copy.
player->ncomstat for command permissions. Side effect: status() no
longer notifies deities when they go broke or become solvent.
(dispatch): Don't distinguish between transiently and permanently
unavailable commands. Didn't really work anyway.
(player): Remove unused member ncomstat.
(init_nats): Use it. No functional change.
(status): Use it. This sets player->nstat from scratch, not just
MONEY and CAP.
(brea): Don't bother to update player->nstat, status() will.
added that test to make xdump available before break, and faithfully
denied access exactly when xdump wasn't available before. This denied
access when maximum minutes per day were exceeded. Don't.
negative. Some places considered $0 as bankrupt, some didn't. Fix
the ones that did:
(repo_list): report command misreported countries with $0 as broke.
(init_nats): If you had $0, logging out and back in bankrupted you.
(produce_sect, upd_ship): Failed to build sectors and produce stuff
for countries with $0.
(redir_authorized): New parameter expected, reject when zero.
(doredir): Pass !redir_fp, do not close it. Before, an unexpected
redirection silently replaced the existing one.
(dopipe): Pass !redir_fp. Before, an unexpected redirection silently
replaced the existing one, leaking its FILE.
(doexecute): Pass 1.
impossible to implement correctly, and nested execute practically
useless (#116377). Catch and refuse those:
(executing): New.
(doexecute, prompt): Set and clear it.
(redir_authorized): Reject if set.
(doexecute, play): Don't signal doexecute() failure through input_fd,
because that screws up up when we're executing already. Increment
send_eof in doexecute() instead.
(send_eof): External linkage.
of clearing it. Fixes a race condition: when we got EOF on input_fd
and a failed doexecute() in the same iteration of the loop, only one
EOF cookie was sent, leaving the client hung.
makes execute send everything after the command back to the client
verbatim, not just the first argument (with quotes and funny
characters stripped). The client always expected that, and got
confused when the server sent something else.
in mission_pln_equip(), which is called from ac_intercept(). The
inconsistency appeared in Empire3, and had no ill effect then. But
rev. 1.42 screwed up the fuel test here: it made interceptors that
don't use fuel (SAMs) require petrol to be present to fly.