Allow xdump before break; partial solution for #1417871:

(player_coms): Set xdump's c_permit to VIS.
(xdump): Deny countries that couldn't run xdump before access to game
state.
This commit is contained in:
Markus Armbruster 2006-08-13 07:13:37 +00:00
parent 2742a2db62
commit f7233ff841
2 changed files with 7 additions and 3 deletions

View file

@ -398,14 +398,18 @@ xdump(void)
meta = 1;
p = getstarg(player->argp[2], "Table name? ", buf);
}
if (!p)
if (!p || !*p)
return RET_SYN;
type = isdigit(p[0]) ? atoi(p) : ef_byname(p);
if (type >= 0 && type < EF_MAX) {
if (meta)
return xdmeta(type);
else
else if (EF_IS_GAME_STATE(type)
&& (player->ncomstat & NORM) != NORM) {
pr("Access to table %s denied\n", ef_nameof(type));
return RET_FAIL;
} else
return xditem(type, player->argp[2]);
} else if (!strncmp(p, "ver", strlen(p))) {
return xdver(meta);