This commit is contained in:
keni
2015-03-31 13:08:18 -04:00
9 changed files with 32 additions and 0 deletions
+4
View File
@@ -2922,6 +2922,10 @@ SHELLERS
A list of users who are allowed to use the shell escape command (!). The A list of users who are allowed to use the shell escape command (!). The
syntax is the same as WIZARDS. syntax is the same as WIZARDS.
.lp .lp
EXPLORERS
A list of users who are allowed to use the explore mode. The
syntax is the same as WIZARDS.
.lp
MAXPLAYERS MAXPLAYERS
Limit the maximum number of games that can be running at the same time. Limit the maximum number of games that can be running at the same time.
.lp .lp
+4
View File
@@ -3494,6 +3494,10 @@ asterisk (*) allows anyone to start a game in wizard mode.
A list of users who are allowed to use the shell escape command (!). A list of users who are allowed to use the shell escape command (!).
The syntax is the same as WIZARDS. The syntax is the same as WIZARDS.
%.lp %.lp
\item[\ib{EXPLORERS}]
A list of users who are allowed to use the explore mode.
The syntax is the same as WIZARDS.
%.lp
\item[\ib{MAXPLAYERS}] \item[\ib{MAXPLAYERS}]
Limit the maximum number of games taht can be running at the same time. Limit the maximum number of games taht can be running at the same time.
%.lp %.lp
+1
View File
@@ -10,6 +10,7 @@ struct sysopt {
char *support; /* local support contact */ char *support; /* local support contact */
char *recover; /* how to run recover - may be overridden by win port */ char *recover; /* how to run recover - may be overridden by win port */
char *wizards; char *wizards;
char *explorers;
char *shellers; /* like wizards, for ! command (-DSHELL) */ char *shellers; /* like wizards, for ! command (-DSHELL) */
char *debugfiles; /* files to show debugplines in. '*' is all. */ char *debugfiles; /* files to show debugplines in. '*' is all. */
int env_dbgfl; /* 1: debugfiles comes from getenv("DEBUGFILES") int env_dbgfl; /* 1: debugfiles comes from getenv("DEBUGFILES")
+8
View File
@@ -509,6 +509,14 @@ enter_explore_mode(VOID_ARGS)
} else if (discover) { } else if (discover) {
You("are already in explore mode."); You("are already in explore mode.");
} else { } else {
#ifdef SYSCF
if (!sysopt.explorers ||
!sysopt.explorers[0] ||
!check_user_string(sysopt.explorers)) {
You("cannot access explore mode.");
return 0;
}
#endif
pline( pline(
"Beware! From explore mode there will be no return to normal game."); "Beware! From explore mode there will be no return to normal game.");
if (paranoid_query(ParanoidQuit, if (paranoid_query(ParanoidQuit,
+3
View File
@@ -2184,6 +2184,9 @@ int src;
} else if (src == SET_IN_SYS && match_varname(buf, "SHELLERS", 8)) { } else if (src == SET_IN_SYS && match_varname(buf, "SHELLERS", 8)) {
if (sysopt.shellers) free(sysopt.shellers); if (sysopt.shellers) free(sysopt.shellers);
sysopt.shellers = dupstr(bufp); sysopt.shellers = dupstr(bufp);
} else if (src == SET_IN_SYS && match_varname(buf, "EXPLORERS", 7)) {
if (sysopt.explorers) free(sysopt.explorers);
sysopt.explorers = dupstr(bufp);
} else if (src == SET_IN_SYS && match_varname(buf, "DEBUGFILES", 5)) { } else if (src == SET_IN_SYS && match_varname(buf, "DEBUGFILES", 5)) {
if (sysopt.debugfiles) free(sysopt.debugfiles); if (sysopt.debugfiles) free(sysopt.debugfiles);
/* if showdebug() has already been called (perhaps we've added /* if showdebug() has already been called (perhaps we've added
+5
View File
@@ -437,6 +437,11 @@ struct obj *otmp;
"Only Amiga makes it possible.", "Only Amiga makes it possible.",
"CATS have all the answers.", "CATS have all the answers.",
#endif #endif
"This mail complies with the Yendorian Anti-Spam Act (YASA)",
"Please find enclosed a small token to represent your Owlbear",
"**FR33 P0T10N 0F FULL H34L1NG**",
"Please return to sender (Asmodeus)",
"Buy a potion of gain level for only $19.99! Guaranteed to be blessed!",
"Invitation: Visit the NetHack web site at http://www.nethack.org!" "Invitation: Visit the NetHack web site at http://www.nethack.org!"
}; };
+1
View File
@@ -33,6 +33,7 @@ sys_early_init()
#endif #endif
sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */ sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */
sysopt.shellers = NULL; sysopt.shellers = NULL;
sysopt.explorers = NULL;
sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */ sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */
/* record file */ /* record file */
+3
View File
@@ -14,6 +14,9 @@ WIZARDS=root games
# Uses the same syntax as the WIZARDS option above. # Uses the same syntax as the WIZARDS option above.
#SHELLERS= #SHELLERS=
# Users allowed to use #exploremode. Same syntax as WIZARDS above.
EXPLORERS=*
# Show debugging information originating from these source files. # Show debugging information originating from these source files.
# Use '*' for all, or list source files separated by spaces. # Use '*' for all, or list source files separated by spaces.
# Only available if game has been compiled with DEBUG. # Only available if game has been compiled with DEBUG.
+3
View File
@@ -14,6 +14,9 @@ WIZARDS=*
# Uses the same syntax as the WIZARDS option above. # Uses the same syntax as the WIZARDS option above.
#SHELLERS= #SHELLERS=
# Users allowed to use #exploremode. Same syntax as WIZARDS above.
EXPLORERS=*
# Show debugging information originating from these source files. # Show debugging information originating from these source files.
# Use '*' for all, or list source files separated by spaces. # Use '*' for all, or list source files separated by spaces.
# Only available if game has been compiled with DEBUG. # Only available if game has been compiled with DEBUG.