Revise nation status command permissions

Create new command capability NONVIS.  Give it to players in any state
except visitors (and STAT_UNUSED, but those must not exist).  This
makes it possible to have commands available to anyone but visitors.

Command change fails when the player is a visitor.  Simply make it
unavailable instead, by requiring NONVIS.

Make read unavailable to visitors, because it's useless: visitors
can't receive telegrams (typed_wu() fails).

Make census, commodity and sinfra unavailable to visitors.  Visitors
don't normally have sectors.

Make map and nmap unavailable to visitors.  Visitors don't have sectors,
so their maps are always empty.

Make them unavailable to new players (between add and newcap) and
players in sanctuary, too.  This is consistent with all the other
commands to examine the environment.  It also prevents people from
trying multiple unbroken countries in a blitz to find the one with the
nicest vicinity.

Make resource available to new players, for consistency with census
and commodity.

Make country, echo and financial available to anyone.
This commit is contained in:
Markus Armbruster 2012-02-18 16:19:59 +01:00
parent 481d1dabe2
commit f9fc80e2de
4 changed files with 15 additions and 17 deletions

View file

@ -42,6 +42,7 @@
#include "types.h"
/* player command capabilities */
#define NONVIS bit(0) /* can execute common commands (visitors can't) */
#define SANCT bit(1) /* can execute commands available in sanctuary */
#define NORM bit(2) /* can execute active player commands */
#define GOD bit(3) /* can execute deity commands */