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:
parent
2742a2db62
commit
f7233ff841
2 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -277,7 +277,7 @@ struct cmndstr player_coms[] = {
|
|||
{"wipe <SECTS>", 1, wipe, C_MOD, NORM},
|
||||
{"wire [yes|no|<days>]", 0, rea, C_MOD, VIS},
|
||||
{"work <LAND UNITS> <AMOUNT>", 1, work, C_MOD, NORM + MONEY + CAP},
|
||||
{"xdump [\"meta\"] <TYPE|\"ver\"> [<RECORDS>]", 0, xdump, 0, NORM},
|
||||
{"xdump [\"meta\"] <TYPE|\"ver\"> [<RECORDS>]", 0, xdump, 0, VIS},
|
||||
{"zdone <y|n|c>", 0, zdon, C_MOD, NORM},
|
||||
{0, 0, 0, 0, 0}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue