From: Pasi Kallinen Date: Wed, 9 Dec 2015 20:27:22 +0000 (+0200) Subject: Allow unlimited number of players X-Git-Tag: NetHack-3.6.1_RC01~1201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43550bee53b10318fd71630bffe5f02843c06bee;p=nethack Allow unlimited number of players This is important for public servers. Setting the MAXPLAYERS sysconf value to 0 (or commenting it out) constructs the lock files with the player UID and player name, so each player may have one game at a time. --- diff --git a/src/files.c b/src/files.c index 1b74a56b4..7699ee1cc 100644 --- a/src/files.c +++ b/src/files.c @@ -2279,7 +2279,7 @@ int src; } else if (src == SET_IN_SYS && match_varname(buf, "MAXPLAYERS", 10)) { n = atoi(bufp); /* XXX to get more than 25, need to rewrite all lock code */ - if (n < 1 || n > 25) { + if (n < 0 || n > 25) { raw_printf("Illegal value in MAXPLAYERS (maximum is 25)."); return 0; } diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 83d33d466..1bed4487f 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -31,6 +31,12 @@ EXPLORERS=* #SHELLERS= # Limit the number of simultaneous games (see also nethack.sh). +# Valid values are 0-25. +# Commenting this out or setting the value to 0 constructs lock files +# with UID and username, so each user may have one game at a time, but +# number of different players is not limited. +# Setting this to any other value constructs the lock files with +# letter and "lock" (eg. alock, block, ...) MAXPLAYERS=10 # If not null, added to string "To get local support, " in the support