From f368072f1a41882c1253a2b9901b7f2c069bd557 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 2 Nov 2001 22:05:24 +0000 Subject: [PATCH] added menu 317, toggle FS edit shortcut keys --- mbsebbs/change.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++- mbsebbs/change.h | 38 ++++++++++++----------- mbsebbs/menu.c | 10 +++++- 3 files changed, 108 insertions(+), 20 deletions(-) diff --git a/mbsebbs/change.c b/mbsebbs/change.c index b7886d9b..c4d2b583 100644 --- a/mbsebbs/change.c +++ b/mbsebbs/change.c @@ -2,7 +2,7 @@ * * File ..................: bbs/change.c * Purpose ...............: Change user settings - * Last modification date : 28-Jun-2001 + * Last modification date : 27-Oct-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -203,6 +203,7 @@ void Chg_Password() exitinfo.iPassword = crc; memset(&exitinfo.Password, 0, sizeof(exitinfo.Password)); sprintf(exitinfo.Password, "%s", temp2); + exitinfo.tLastPwdChange = time(NULL); Enter(1); /* Password Change Successful */ language(10, 0, 124); @@ -381,6 +382,31 @@ void Chg_FsMsged() +/* + * Toggle Fullscreen Editor Shotcut keys + */ +void Chg_FsMsgedKeys() +{ + ReadExitinfo(); + Enter(2); + + if (exitinfo.FSemacs) { + exitinfo.FSemacs = FALSE; + /* Fullscreen Editor shortcut keys set to Wordstar */ + pout(10, 0, (char *) Language(473)); + } else { + exitinfo.FSemacs = TRUE; + /* Fullscreen Editor shortcut keys set to Emacs */ + pout(10, 0, (char *) Language(472)); + } + Enter(2); + sleep(2); + Syslog('+', "FS editor shortcut keys changed to %s", exitinfo.FSemacs?"Emacs":"Wordstar"); + WriteExitinfo(); +} + + + /* * Function to toggle DoNotDisturb Flag */ @@ -455,6 +481,58 @@ void Chg_Location() +void Chg_Address() +{ + int i; + char temp[41]; + + ReadExitinfo(); + Syslog('+', "Old address \"%s\"", exitinfo.address[0]); + Syslog('+', " \"%s\"", exitinfo.address[1]); + Syslog('+', " \"%s\"", exitinfo.address[2]); + + while (TRUE) { + Enter(1); + /* Old address: */ + pout(WHITE, BLACK, (char *) Language(476)); + Enter(1); + colour(LIGHTBLUE, BLACK); + printf("%s\n", exitinfo.address[0]); + printf("%s\n", exitinfo.address[1]); + printf("%s\n", exitinfo.address[2]); + Enter(1); + /* Your address, maximum 3 lines (only visible for the sysop): */ + pout(YELLOW, BLACK, (char *) Language(474)); + Enter(1); + + for (i = 0; i < 3; i++ ) { + colour(YELLOW, BLACK); + printf("%d: ", i+1); + colour(CFG.InputColourF, CFG.InputColourB); + fflush(stdout); + alarm_on(); + GetstrC(temp, 40); + if (strcmp(temp, "")) + Setup(exitinfo.address[i], temp); + } + + if (strlen(exitinfo.address[0]) || strlen(exitinfo.address[1]) || strlen(exitinfo.address[2])) + break; + + Enter(1); + /* You need to enter your address here */ + pout(LIGHTRED, BLACK, (char *)Language(475)); + Enter(1); + } + + Syslog('+', "New address \"%s\"", exitinfo.address[0]); + Syslog('+', " \"%s\"", exitinfo.address[1]); + Syslog('+', " \"%s\"", exitinfo.address[2]); + WriteExitinfo(); +} + + + /* * Toggle Graphics */ diff --git a/mbsebbs/change.h b/mbsebbs/change.h index 04b0bd8d..f76f038f 100644 --- a/mbsebbs/change.h +++ b/mbsebbs/change.h @@ -2,24 +2,26 @@ #define _CHANGE_H -int Chg_Language(int); /* Change language */ -void Chg_Password(void); /* Change BBS Password */ -void Chg_Handle(void); /* Change Handle */ -void Chg_Hotkeys(void); /* Toggle Hotkeys */ -void Chg_Disturb(void); /* Toggle "Do not disturb" */ -void Chg_MailCheck(void); /* Toggle New Mail Check */ -void Chg_FileCheck(void); /* Toggle New Files Check */ -void Chg_FsMsged(void); /* Toggle Fullscreen Editor */ -void Chg_Location(void); /* Change location */ -void Chg_Graphics(void); /* Toggle graphics */ -void Chg_VoicePhone(void); /* Change voicephone */ -void Chg_DataPhone(void); /* Change dataphone */ -void Chg_News(void); /* Toggle News Bulletins */ -void Chg_ScreenLen(void); /* Change screen len */ -int Test_DOB(char *); /* Test of Date of Birth is valid */ -void Chg_DOB(void); /* Change Date of Birth */ -void Chg_Protocol(void); /* Change default transfer protocol. */ -void Set_Protocol(char *); /* Set default protocol */ +int Chg_Language(int); /* Change language */ +void Chg_Password(void); /* Change BBS Password */ +void Chg_Handle(void); /* Change Handle */ +void Chg_Hotkeys(void); /* Toggle Hotkeys */ +void Chg_Disturb(void); /* Toggle "Do not disturb" */ +void Chg_MailCheck(void); /* Toggle New Mail Check */ +void Chg_FileCheck(void); /* Toggle New Files Check */ +void Chg_FsMsged(void); /* Toggle Fullscreen Editor */ +void Chg_FsMsgedKeys(void); /* Toggle FS editor shortcut keys */ +void Chg_Location(void); /* Change location */ +void Chg_Address(void); /* Change address */ +void Chg_Graphics(void); /* Toggle graphics */ +void Chg_VoicePhone(void); /* Change voicephone */ +void Chg_DataPhone(void); /* Change dataphone */ +void Chg_News(void); /* Toggle News Bulletins */ +void Chg_ScreenLen(void); /* Change screen len */ +int Test_DOB(char *); /* Test of Date of Birth is valid */ +void Chg_DOB(void); /* Change Date of Birth */ +void Chg_Protocol(void); /* Change default transfer protocol. */ +void Set_Protocol(char *); /* Set default protocol */ #endif diff --git a/mbsebbs/menu.c b/mbsebbs/menu.c index 94a0c56b..e7687e1a 100644 --- a/mbsebbs/menu.c +++ b/mbsebbs/menu.c @@ -2,7 +2,7 @@ * * File ..................: bbs/menu.c * Purpose ...............: Display and handle the menus. - * Last modification date : 17-Oct-2001 + * Last modification date : 27-Oct-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -639,6 +639,14 @@ void DoMenu(int Type) Chg_FsMsged(); break; + case 317: + Chg_FsMsgedKeys(); + break; + + case 318: + Chg_Address(); + break; + case 401: Oneliner_Add(); break;