Added email notification to login

This commit is contained in:
Andrew Pamment 2016-03-25 22:46:35 +10:00
parent 2e7dfecf97
commit ecb1802854
2 changed files with 20 additions and 2 deletions

12
bbs.c
View File

@ -723,6 +723,18 @@ void runbbs(int socket, char *config_path) {
display_last10_callers(socket, user, 1); display_last10_callers(socket, user, 1);
// check email
i = mail_getemailcount(user);
if (i > 0) {
sprintf(buffer, "\r\nYou have %d e-mail(s) in your inbox.\r\n", i);
s_putstring(socket, buffer);
} else {
s_putstring(socket, "\r\nYou have no e-mail.\r\n");
}
sprintf(buffer, "\r\nPress any key to continue...\r\n");
s_putstring(socket, buffer);
s_getc(socket);
// main menu // main menu
main_menu(socket, user); main_menu(socket, user);

10
doors.c
View File

@ -75,8 +75,14 @@ int door_menu(int socket, struct user_record *user) {
dodoors = 1; dodoors = 1;
break; break;
case 'g': case 'g':
doquit = 1; {
dodoors = 1; s_putstring(socket, "\r\nAre you sure you want to log off? (Y/N)");
c = s_getc(socket);
if (tolower(c) == 'y') {
doquit = 1;
dodoors = 1;
}
}
break; break;
default: default:
{ {