diff --git a/src/lib/commands/xdump.c b/src/lib/commands/xdump.c index 0052323b..9122eae6 100644 --- a/src/lib/commands/xdump.c +++ b/src/lib/commands/xdump.c @@ -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); diff --git a/src/lib/player/empmod.c b/src/lib/player/empmod.c index 3b084cdf..e3676b72 100644 --- a/src/lib/player/empmod.c +++ b/src/lib/player/empmod.c @@ -277,7 +277,7 @@ struct cmndstr player_coms[] = { {"wipe ", 1, wipe, C_MOD, NORM}, {"wire [yes|no|]", 0, rea, C_MOD, VIS}, {"work ", 1, work, C_MOD, NORM + MONEY + CAP}, - {"xdump [\"meta\"] []", 0, xdump, 0, NORM}, + {"xdump [\"meta\"] []", 0, xdump, 0, VIS}, {"zdone ", 0, zdon, C_MOD, NORM}, {0, 0, 0, 0, 0} };