]> granicus.if.org Git - nethack/commitdiff
SYSCF wizard error display
authorkeni <keni>
Tue, 19 Jan 2010 16:33:43 +0000 (16:33 +0000)
committerkeni <keni>
Tue, 19 Jan 2010 16:33:43 +0000 (16:33 +0000)
Fix construction of error message when wizard mode declined and SYSCF.

sys/unix/unixmain.c

index 9a6cbb418847f93933bd9c0d1be55d27bd6cdf39..45854f93bec880b315ae60312178d2ab5012a869 100644 (file)
@@ -584,8 +584,17 @@ wd_message()
 {
        if (wiz_error_flag) {
 #ifdef WIZARD
+# ifdef SYSCF
+           if (sysopt.wizards && sysopt.wizards[0]) {
+               char *tmp = build_english_list(sysopt.wizards);
+               pline("Only user%s %s may access debug (wizard) mode.",
+                       index(sysopt.wizards, ' ')?"s":"", tmp);
+               free(tmp);
+           } else
+# else
                pline("Only user \"%s\" may access debug (wizard) mode.",
                      WIZARD_NAME);
+# endif
 #else
                pline("Debug mode is not available.");
 #endif