Make WIZARD unconditional.

This commit is contained in:
Sean Hunt
2015-02-14 00:31:17 -05:00
committed by Pasi Kallinen
parent eca41ae060
commit cc7ab4a2da
62 changed files with 42 additions and 493 deletions

View File

@@ -136,13 +136,10 @@ char *argv[];
or holds a generic user name like "player" or "games" */
plnamesuffix();
#ifdef WIZARD
if (wizard) {
/* use character name rather than lock letter for file names */
locknum = 0;
} else
#endif
{
} else {
/* suppress interrupts while processing lock file */
(void) signal(SIGQUIT, SIG_IGN);
(void) signal(SIGINT, SIG_IGN);
@@ -416,12 +413,10 @@ genericptr_t sigargs, mechargs; /* [0] is argc, [1..argc] are the real args */
|| (condition >= SS$_ASTFLT && condition <= SS$_TBIT)
|| (condition >= SS$_ARTRES && condition <= SS$_INHCHME)) {
program_state.done_hup = TRUE; /* pretend hangup has been attempted */
# if defined(WIZARD) && !defined(BETA)
# ifndef BETA
if (wizard)
# endif /*WIZARD && !BETA*/
# if defined(WIZARD) || defined(BETA)
# endif /* !BETA */
abort(); /* enter the debugger */
# endif /*WIZARD || BETA*/
}
return SS$_RESIGNAL;
}
@@ -454,9 +449,7 @@ port_help()
boolean
authorize_wizard_mode()
{
#ifdef WIZARD
if (!strcmpi(nh_getenv("USER"), WIZARD_NAME)) return TRUE;
#endif
wiz_error_flag = TRUE; /* not being allowed into wizard mode */
return FALSE;
}
@@ -465,12 +458,8 @@ static void
wd_message()
{
if (wiz_error_flag) {
#ifdef WIZARD
pline("Only user \"%s\" may access debug (wizard) mode.",
WIZARD_NAME);
#else
pline("Debug mode is not available.");
#endif
pline("Entering explore/discovery mode instead.");
wizard = 0, discover = 1; /* (paranoia) */
} else if (discover)

View File

@@ -367,9 +367,7 @@ hack_resume(screen_manip)
boolean screen_manip;
{
(void) signal(SIGINT, (SIG_RET_TYPE) done1);
# ifdef WIZARD
if (wizard) (void) signal(SIGQUIT,SIG_DFL);
# endif
if (screen_manip)
resume_nhwindows(); /* setup terminal modes, redraw screen, &c */
}