Fix a little fallout, also notify mailer of failed login...

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@196 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Joshua Kwan 2004-01-31 03:10:03 +00:00
parent 710df809e0
commit 8bdb57a194
2 changed files with 14 additions and 6 deletions

View File

@ -482,7 +482,7 @@ inprogressmenu ()
clear (); clear ();
drawbanner (1, 1); drawbanner (1, 1);
mvprintw (3, 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, mvaddstr (4, 1,
"(Use capital letter of selection to strip DEC graphics, VERY experimental!)"); "(Use capital letter of selection to strip DEC graphics, VERY experimental!)");
mvaddstr (5, 1, "The following games are in progress:"); mvaddstr (5, 1, "The following games are in progress:");
@ -846,6 +846,12 @@ loginprompt (int from_ttyplay)
loggedin = 1; loggedin = 1;
snprintf (rcfilename, 80, "%srcfiles/%s.nethackrc", myconfig->dglroot, me->username); 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);
}
} }
/* ************************************************************* */ /* ************************************************************* */

View File

@ -198,13 +198,15 @@ ttypread (FILE * fp, Header * h, char **buf, int pread)
{ {
initcurses(); initcurses();
loginprompt(1); loginprompt(1);
if (!loggedin) return READ_RESTART;
} }
if (loggedin) if (loggedin)
{ {
initcurses (); initcurses ();
domailuser (chosen_name); domailuser (chosen_name);
return READ_RESTART; return READ_RESTART;
} }
break; break;
} }
} }