Reduce the chance of a player playing on a public server encountering
their own bones, by implementing separate bones pools. The pool a player
belongs to is determined at game start, and only bones in that pool
are used. The sysconf BONES_POOLS allows the sysadmin to define how
many pools there are.
Setting CHECK_PLNAME to 1 makes WIZARDS, EXPLORERS, and SHELLERS
check the player name instead of the user's login name.
This is mostly useful for public servers which have external
login system and don't create user accounts for players.
Fix the situation where disabling PANICTRACE, which happened implicitly
when BETA got disabled, caused SYSCF option processing to complain and
quit if the 'sysconf' file contained any PANICTRACE settings.
Now accept all the PANICTRACE options (assuming SYSCF is defined) even
if PANICTRACE is not defined. Their values are recorded in the 'sysopt'
struct, but only validated when the appropriate macros (PANICTRACE,
PANICTRACE_LIB) are defined.
Preformat SYSCF entry 'WIZARDS' so that it can be displayed during panic
feedback without allocating memory for the formatted list at that time.
It also gets displayed for help's "support information" ('?k').
For panic(), push "it may be possible to rebuild" to a second line since
the formatted usernames might make the line long.
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.
The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
If getenv("DEBUGFILES") yields a value then it takes precedence over
sysconf.DEBUGFILES or sys.c's #define DEBUGFILES. (It probably should
only be controlled via environment since it is not a system-wide
attribute, but I haven't taken out the SYSCF handling for it.)
Move debugging output into couple preprocessor defines, which
are no-op without DEBUG. To show debugging output from a
certain source files, use sysconf:
DEBUGFILES=dungeon.c questpgr.c
Also fix couple debug lines which did not compile.
This also includes fixes due to Derek Ray to depugpline to work better
on other platforms.
(This covers some thing that Pat found and some things I found while working
on those.)
Unscramble duplicate use of GREPPATH and GDBPATH symbols.
Add some more info to config.h.
Make missing SYSCF_FILE a fatal error.
Make a parse error in SYSCF_FILE a fatal error.
Rename PANICTRACE_GLIBC (et al) to PANICTRACE_LIBC (et al) since FreeBSD
and Mac OS X (at least) also implement the needed API.
Allow SYSCF_FILE to be unreadable by the user (for setgid installs).
If SYSCF, do NOT fall back to the compiled in WIZARD account.
Put WIZARD into sysopt and remove special cases in authorize_wizard_mode().
add SYSCF docs to the Guidebook because it's info needed in a binary distro
Guidebook.tex - also add some missing italics to some "NetHack" occurances
call nethack.org "official"
Guidebook.txt - didn't regenerate cleanly so no diff
add SEDUCE to SYSCF (only partly inspired by the recent email)
On crash signal or panic(), use a configurable method to get a stacktrace
the user can easily report to us. Currently only for Unix/Linux and only
ifdef BETA. Hopefully ports can add additional methods.
Bits:
- linux hints file had PREFIX definition in the wrong place
- sample sysconf file used wrong delimiter for WIZARDS
- fix grammar error in support message when using sysconf.wizards
- options.c comment typo
- capitalize "Crash test" output from #panic command
Add sys/unix/sysconf, a sample sysconf file.
Move defines from topten.c to config.h so they can be seen globally.
Add persmax, pers_is_uid, entrymax, and pointsmin to struct sysopt, use
in topten.c, populate in files.c
Warning cleanup in files.c.
BUGFIX: don't crash in unixmain.c if WIZARDS left unspecified.
hints/macosx10.5: don't hardcode "keni"; install sample sysconf; install
sample ~/nethackrc
makedefs: add "system configuration" to compiled-with options list.
BUGFIX: if a game doesn't meet the criteria for making the record file it's
shown to the user as having zero points because t1->points is set to zero
to indicate that it doesn't get written back; display u.urexp instead.
Add SHELLERS - people allowed to use ! command with same syntax as WIZARDS.
Add new hints file for 10.5, since the rules and commands for groups changed
(new commands introduced in 10.4, old ones removed in 10.5; creating a new
user under 10.4 gave you a matching group, in 10.5 it doesn't). Also move
shared build into roughly right place in file system when being installed
for root - don't use ~root.
Makefile.top - don't remove ./-p unless it exists (that's always annoyed me).
fix error invoking macosx.sh
Add MAXPLAYERS to SYSCF config file; deprecate (but continue to support)
MAX_NR_OF_PLAYERS in nethack.sh since it is trivially overridden in many
(all?) cases and isn't useful for ports that don't use nethack.sh.
infrastructure for "system options" - things currently specified at build
time that should be changeable at install time or run time but not really
under user control
generalize contact info so it can be localized and it doesn't have to be
an email address
move recently introduced WIZARDS into sysopt
drop bogus OPTIONS=wizards possibility
new function build_english_list() to comma-ize and add 'or' from a whitespace separated list: A. A or B. A, B, or C.
syscf file now handles: WIZARDS SUPPORT RECOVER
SUPPORT specifies local support information
RECOVER will eventually supply port-specific and/or localized info on how
to run recover (or get it run for you).
Note: in sys/msdos I changed sys.o (generated from pcsys.c) to pcsys.o
Note: sys/msdos/Makefile.GCC has 2 rules for sys.o (now pcsys.o)