]> skyeroc.xyz Git - dgamelaunch/commitdiff
Fix a little fallout, also notify mailer of failed login...
authorJoshua Kwan <joshk@triplehelix.org>
Sat, 31 Jan 2004 03:10:03 +0000 (03:10 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Sat, 31 Jan 2004 03:10:03 +0000 (03:10 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@196 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c
ttyplay.c

index 53646b4870fdd7b64145e7fa9a91a7a9e045f5fe..7a2944c0039a6441e218b49ccddcbc5d46ff7e66 100644 (file)
@@ -482,7 +482,7 @@ inprogressmenu ()
       clear ();
       drawbanner (1, 1);
       mvprintw (3, 1,
-                "During playback, hit 'q' to return here, 'm' to send mail (requires login");
+                "During playback, hit 'q' to return here, 'm' to send mail (requires login)");
       mvaddstr (4, 1,
                 "(Use capital letter of selection to strip DEC graphics, VERY experimental!)");
       mvaddstr (5, 1, "The following games are in progress:");
@@ -846,6 +846,12 @@ loginprompt (int from_ttyplay)
       loggedin = 1;
       snprintf (rcfilename, 80, "%srcfiles/%s.nethackrc", myconfig->dglroot, me->username);
     }
+  else if (from_ttyplay == 1)
+  {
+    mvaddstr(9, 1, "Login failed. Returning to game.");
+    refresh();
+    sleep(2);
+  }
 }
 
 /* ************************************************************* */
index df2409bab6bd47383b10bfb319fc6582ab1507e7..08b3d67f21acabf8f2472f52996b46c88cd2d447 100644 (file)
--- a/ttyplay.c
+++ b/ttyplay.c
@@ -198,13 +198,15 @@ ttypread (FILE * fp, Header * h, char **buf, int pread)
              {
                initcurses();
                loginprompt(1);
+               if (!loggedin) return READ_RESTART;
              }
               if (loggedin)
-                {
-                  initcurses ();
-                  domailuser (chosen_name);
-                  return READ_RESTART;
-                }
+             {
+               initcurses ();
+               domailuser (chosen_name);
+                return READ_RESTART;
+             }
+             
               break;
             }
         }