]> git.pond.sub.org Git - empserver/commit
Revise nation status command permissions
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 18 Feb 2012 15:19:59 +0000 (16:19 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 25 Feb 2012 10:24:32 +0000 (11:24 +0100)
commitf9fc80e2dee979ff0d6caeba04c13474ea51b62d
tree7e75595f14da313937c59535c8a515547d2e59dd
parent481d1dabe2547aba280ef391d945894a266c90bb
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.
include/player.h
src/lib/commands/chan.c
src/lib/player/empmod.c
src/lib/player/init_nats.c