(dispatch, explain, status): Use player->nstat instead of

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.
This commit is contained in:
Markus Armbruster 2007-12-08 20:47:13 +00:00
parent 1476e59dce
commit 976c885dfc
4 changed files with 10 additions and 15 deletions

View file

@ -61,18 +61,14 @@ dispatch(char *buf, char *redir)
struct cmndstr *command;
int cmd;
cmd = comtch(player->argp[0], player_coms, player->ncomstat);
cmd = comtch(player->argp[0], player_coms, player->nstat);
if (cmd < 0) {
if (cmd == M_NOTUNIQUE)
pr("Command \"%s\" is ambiguous -- ", player->argp[0]);
else if (cmd == M_IGNORE)
return 0;
else {
pr("\"%s\" is not a legal command ", player->argp[0]);
if (player->nstat != player->ncomstat)
pr("now ");
pr("\n");
}
else
pr("\"%s\" is not a legal command\n", player->argp[0]);
return -1;
}
command = &player_coms[cmd];