Added posting messages with user alias

This commit is contained in:
Michiel Broek 2001-11-09 13:53:19 +00:00
parent c74db44255
commit 0e6883b9e5
10 changed files with 327 additions and 248 deletions

View File

@ -4220,7 +4220,8 @@ v0.33.19 26-Oct-2001
lang: lang:
Changed language prompt 71. Changed language prompt 71.
Added language prompts 472 and 473 for FS editor. Added language prompts 472 and 473 for FS editor.
Added language prompts 474 and 475 for address entry. Added language prompts 474, 475 and 476 for address entry.
Added language prompts 477 and 478 for post with user alias.
examples: examples:
SAVE: SAVE:
@ -4253,6 +4254,7 @@ v0.33.19 26-Oct-2001
- Fixed display file with more that stopped after every line. - Fixed display file with more that stopped after every line.
- Added display file "mainlogo" before the "welcome" file. - Added display file "mainlogo" before the "welcome" file.
- Added display files "welcome2..9" after "welcome1" file. - Added display files "welcome2..9" after "welcome1" file.
Posting message with users alias is now possible.
mbtask: mbtask:
Changed to handle the External Doors flag in the lastcaller Changed to handle the External Doors flag in the lastcaller

6
TODO
View File

@ -1,3 +1,5 @@
$Id$
MBSE BBS V0.33.19 TODO list. MBSE BBS V0.33.19 TODO list.
---------------------------- ----------------------------
@ -21,7 +23,7 @@ mbsebbs:
It works with direct serial connections. Note, this also happens It works with direct serial connections. Note, this also happens
on busy LAN's between Linux boxes with normal xterm's. on busy LAN's between Linux boxes with normal xterm's.
Note: this problem almost dissapeared after kernel upgrade to Note: this problem almost dissapeared after kernel upgrade to
2.2.16. 2.2.16. Another note, this does not happen over ssh.
L: Must include SEEN-BY and other hidden lines into BlueWave and QWK L: Must include SEEN-BY and other hidden lines into BlueWave and QWK
mail, must be user selectable. see remarks of William McBrine. mail, must be user selectable. see remarks of William McBrine.
@ -35,8 +37,6 @@ mbsebbs:
N: Check for tagged files before logoff N: Check for tagged files before logoff
N: Can't post messages to users handle.
L: Implement telnet door. L: Implement telnet door.
L: Spell checker in full screen editor. L: Spell checker in full screen editor.

View File

@ -2,7 +2,7 @@
<HEAD> <HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO 8859-1"> <META http-equiv="Content-Type" content="text/html; charset=ISO 8859-1">
<META http-equiv="Content-Style-Type" content="text/css"> <META http-equiv="Content-Style-Type" content="text/css">
<META name="author" lang="en" "content="Michiel Broek"> <META name="author" lang="en" "content=Michiel Broek">
<META name="copyright" lang="en" content="Copyright Michiel Broek"> <META name="copyright" lang="en" content="Copyright Michiel Broek">
<META name="description" lang="en" content="MBSE BBS Manual"> <META name="description" lang="en" content="MBSE BBS Manual">
<META name="keywords" lang="en" content="MBSE BBS, MBSE, BBS, manual, fido, fidonet, gateway, tosser, mail, tic, mailer"> <META name="keywords" lang="en" content="MBSE BBS, MBSE, BBS, manual, fido, fidonet, gateway, tosser, mail, tic, mailer">
@ -11,7 +11,7 @@
</HEAD> </HEAD>
<BODY> <BODY>
<BLOCKQUOTE> <BLOCKQUOTE>
<h5>Last update 31-Jan-2001</h5> <h5>Last update 09-Nov-2001</h5>
<P>&nbsp;<P> <P>&nbsp;<P>
<H1>mbsebbs - The main BBS program</H1> <H1>mbsebbs - The main BBS program</H1>
@ -72,10 +72,19 @@ screens are searched for in the following order;<br>
<li>filename.asc in the default language directory. <li>filename.asc in the default language directory.
<li>If nothing is found, nothing is displayed. <li>If nothing is found, nothing is displayed.
</ol> </ol>
<strong>mainlogo</strong>. Here you can put a logo or something.
<strong>welcome</strong>. This screen can contain information about the session <strong>welcome</strong>. This screen can contain information about the session
the user has, his download limits, time left etc. the user has, his download limits, time left etc.
<P> <P>
<strong>welcome1</strong> is shown if the user has show bulletins set to true. <strong>welcome1</strong> is shown if the user has show bulletins set to true.
<strong>welcome2</strong> is shown if the user has show bulletins set to true.
<strong>welcome3</strong> is shown if the user has show bulletins set to true.
<strong>welcome4</strong> is shown if the user has show bulletins set to true.
<strong>welcome5</strong> is shown if the user has show bulletins set to true.
<strong>welcome6</strong> is shown if the user has show bulletins set to true.
<strong>welcome7</strong> is shown if the user has show bulletins set to true.
<strong>welcome8</strong> is shown if the user has show bulletins set to true.
<strong>welcome9</strong> is shown if the user has show bulletins set to true.
<P> <P>
<strong>birthday</strong> is shown if the user logs in at his birthday and if he <strong>birthday</strong> is shown if the user logs in at his birthday and if he
has show bullentins set to true. has show bullentins set to true.

View File

@ -475,3 +475,5 @@
474 newuser.c change.c |Your address, maximum 3 lines (only visible for the sysop): 474 newuser.c change.c |Your address, maximum 3 lines (only visible for the sysop):
475 newuser.c change.c |You need to enter your address here 475 newuser.c change.c |You need to enter your address here
476 change.c |Old address: 476 change.c |Old address:
477 mail.c |Use your alias (
478 mail.c YN|) to post this message [Y/n]:

View File

@ -475,3 +475,5 @@ JN|Bestand meesturen [j/N]:
|Geef adres, maximaal 3 regels (alleen zichtbaar voor de sysop): |Geef adres, maximaal 3 regels (alleen zichtbaar voor de sysop):
|U moet hier Uw adres opgeven |U moet hier Uw adres opgeven
|Oude adres: |Oude adres:
|Use your alias (
YN|) to post this message [Y/n]:

View File

@ -475,3 +475,5 @@ YN|Attach file [y/N]:
|Your address, maximum 3 lines (only visible for the sysop): |Your address, maximum 3 lines (only visible for the sysop):
|You need to enter your address here |You need to enter your address here
|Old address: |Old address:
|Use your alias (
YN|) to post this message [Y/n]:

View File

@ -475,3 +475,5 @@ YN|Adxuntar ficheiro [s/N]:
|Your address, maximum 3 lines (only visible for the sysop): |Your address, maximum 3 lines (only visible for the sysop):
|You need to enter your address here |You need to enter your address here
|Old address: |Old address:
|Use your alias (
YN|) to post this message [Y/n]:

View File

@ -475,3 +475,5 @@ SN|Allega file [s/N]:
|Your address, maximum 3 lines (only visible for the sysop): |Your address, maximum 3 lines (only visible for the sysop):
|You need to enter your address here |You need to enter your address here
|Old address: |Old address:
|Use your alias (
YN|) to post this message [Y/n]:

View File

@ -475,3 +475,5 @@ YN|Adjuntar fichero [s/N]:
|Your address, maximum 3 lines (only visible for the sysop): |Your address, maximum 3 lines (only visible for the sysop):
|You need to enter your address here |You need to enter your address here
|Old address: |Old address:
|Use your alias (
YN|) to post this message [Y/n]:

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: bbs/mail.c * $Id$
* Purpose ...............: Message reading and writing. * Purpose ...............: Message reading and writing.
* Last modification date : 26-Oct-2001
* Todo ..................: Implement message groups. * Todo ..................: Implement message groups.
* *
***************************************************************************** *****************************************************************************
@ -132,7 +131,7 @@ int Post_Allowed(void)
{ {
if (msgs.MsgKinds == RONLY) { if (msgs.MsgKinds == RONLY) {
/* Message area is Readonly */ /* Message area is Readonly */
pout(12, 0, (char *) Language(437)); pout(LIGHTRED, BLACK, (char *) Language(437));
fflush(stdout); fflush(stdout);
sleep(3); sleep(3);
return FALSE; return FALSE;
@ -142,6 +141,41 @@ int Post_Allowed(void)
/*
* Check if Alias is allowed, and if so if the user
* wants to use this in the From: field.
*/
int Alias_Option(void);
int Alias_Option(void)
{
int rc = TRUE;
if (!msgs.Aliases)
return FALSE;
if (strlen(exitinfo.sHandle) == 0)
return FALSE;
/* Use your alias ( */
pout(CYAN, BLACK, (char *)Language(477));
pout(CYAN, BLACK, exitinfo.sHandle);
/* YN|) to post this message [Y/n]: */
pout(CYAN, BLACK, (char *)Language(478));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
fflush(stdout);
alarm_on();
if (toupper(Getone()) == Keystroke(478, 1)) {
rc = FALSE;
printf("%c", Keystroke(478, 1));
} else {
printf("%c", Keystroke(478, 0));
}
Enter(2);
fflush(stdout);
return rc;
}
/* /*
* Check if netmail may be send crash or immediate. * Check if netmail may be send crash or immediate.
*/ */
@ -161,7 +195,7 @@ int Crash_Option(faddr *Dest)
if (((Nlent = getnlent(Dest)) != NULL) && (Nlent->addr.zone)) { if (((Nlent = getnlent(Dest)) != NULL) && (Nlent->addr.zone)) {
if (Nlent->oflags & OL_CM) { if (Nlent->oflags & OL_CM) {
/* Crash [y/N]: */ /* Crash [y/N]: */
pout(3, 0, (char *)Language(461)); pout(CYAN, BLACK, (char *)Language(461));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB); colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
@ -172,7 +206,7 @@ int Crash_Option(faddr *Dest)
printf("%c", Keystroke(461, 1)); printf("%c", Keystroke(461, 1));
} else { } else {
/* Warning: node is not CM, send Immediate [y/N]: */ /* Warning: node is not CM, send Immediate [y/N]: */
pout(3, 0, (char *)Language(462)); pout(CYAN, BLACK, (char *)Language(462));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB); colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
@ -203,7 +237,7 @@ int IsPrivate(void)
if (msgs.MsgKinds == BOTH) { if (msgs.MsgKinds == BOTH) {
Enter(1); Enter(1);
/* Private [y/N]: */ /* Private [y/N]: */
pout(3, 0, (char *) Language(163)); pout(CYAN, BLACK, (char *) Language(163));
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
if (toupper(Getone()) == Keystroke(163, 0)) { if (toupper(Getone()) == Keystroke(163, 0)) {
@ -243,7 +277,7 @@ void Check_Attach(void)
while (TRUE) { while (TRUE) {
Enter(1); Enter(1);
/* Attach file [y/N]: */ /* Attach file [y/N]: */
pout(3, 0, (char *)Language(463)); pout(CYAN, BLACK, (char *)Language(463));
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
if (toupper(Getone()) == Keystroke(463, 0)) { if (toupper(Getone()) == Keystroke(463, 0)) {
@ -251,7 +285,7 @@ void Check_Attach(void)
printf("%c", Keystroke(463, 0)); printf("%c", Keystroke(463, 0));
Enter(1); Enter(1);
/* Please enter filename: */ /* Please enter filename: */
pout(14, 0, (char *)Language(245)); pout(YELLOW, BLACK, (char *)Language(245));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB); colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
@ -372,15 +406,28 @@ void Post_Msg()
Msg_New(); Msg_New();
colour(9, 0); colour(LIGHTBLUE, BLACK);
/* Posting message in area: */ /* Posting message in area: */
printf("\n%s\"%s\"\n", (char *) Language(156), sMsgAreaDesc); printf("\n%s\"%s\"\n", (char *) Language(156), sMsgAreaDesc);
pout(14, 0, (char *) Language(157));
if (msgs.Type == NEWS) { if (Alias_Option()) {
if (CFG.EmailMode == E_NOISP) {
/* /*
* If not connected to the internet, use Fido style addressing. * Set Handle
*/
strcpy(Msg.From, exitinfo.sHandle);
tlcap(Msg.From); // Do we want this???
/* From : */
pout(YELLOW, BLACK, (char *) Language(157));
} else {
/*
* Normal from address, no alias
*/
/* From : */
pout(YELLOW, BLACK, (char *) Language(157));
if (msgs.Type == NEWS) {
if (CFG.EmailMode != E_PRMISP) {
/*
* If no internet mail domain, use fidonet addressing.
*/ */
Dest = fido2faddr(CFG.EmailFidoAka); Dest = fido2faddr(CFG.EmailFidoAka);
strcpy(Msg.From, exitinfo.sUserName); strcpy(Msg.From, exitinfo.sUserName);
@ -392,15 +439,21 @@ void Post_Msg()
strcpy(Msg.From, exitinfo.sUserName); strcpy(Msg.From, exitinfo.sUserName);
tlcap(Msg.From); tlcap(Msg.From);
} }
colour(CFG.MsgInputColourF, CFG.MsgInputColourB); }
printf("%s", Msg.From);
pout(CFG.MsgInputColourF, CFG.MsgInputColourB, Msg.From);
Syslog('b', "Setting From: %s", Msg.From); Syslog('b', "Setting From: %s", Msg.From);
if (msgs.Type != NEWS) { if ((msgs.Type == NEWS) || (msgs.Type == LIST)) {
/*
* Newsmode or maillist mode, automatic addressing to All.
* */
strcpy(Msg.To, "All");
} else {
while (TRUE) { while (TRUE) {
Enter(1); Enter(1);
/* To : */ /* To : */
pout(14, 0, (char *) Language(158)); pout(YELLOW, BLACK, (char *) Language(158));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB); colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
Getname(Msg.To, 35); Getname(Msg.To, 35);
@ -426,14 +479,14 @@ void Post_Msg()
*/ */
if (msgs.Type == LOCALMAIL) { if (msgs.Type == LOCALMAIL) {
/* Verifying user ... */ /* Verifying user ... */
pout(3, 0, (char *) Language(159)); pout(CYAN, BLACK, (char *) Language(159));
x = CheckUser(Msg.To); x = CheckUser(Msg.To);
} else } else
x = TRUE; x = TRUE;
} }
} else if (msgs.Type == NETMAIL) { } else if (msgs.Type == NETMAIL) {
x = FALSE; x = FALSE;
pout(14, 0, (char *)"Address : "); pout(YELLOW, BLACK, (char *)"Address : ");
FidoNode = calloc(61, sizeof(char)); FidoNode = calloc(61, sizeof(char));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB); colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
GetstrC(FidoNode, 60); GetstrC(FidoNode, 60);
@ -442,7 +495,7 @@ void Post_Msg()
point = Dest->point; point = Dest->point;
Dest->point = 0; Dest->point = 0;
if (((Nlent = getnlent(Dest)) != NULL) && (Nlent->addr.zone)) { if (((Nlent = getnlent(Dest)) != NULL) && (Nlent->addr.zone)) {
colour(14, 0); colour(YELLOW, BLACK);
if (point) if (point)
printf("Boss : "); printf("Boss : ");
else else
@ -470,7 +523,7 @@ void Post_Msg()
} else { } else {
Dest->point = point; Dest->point = point;
printf("\r"); printf("\r");
pout(3, 0, (char *) Language(241)); pout(CYAN, BLACK, (char *) Language(241));
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
if (toupper(Getone()) == Keystroke(241, 0)) { if (toupper(Getone()) == Keystroke(241, 0)) {
@ -489,20 +542,15 @@ void Post_Msg()
if(!x) { if(!x) {
printf("\r"); printf("\r");
/* User not found. Try again, or (Enter) to quit */ /* User not found. Try again, or (Enter) to quit */
pout(3, 0, (char *) Language(160)); pout(CYAN, BLACK, (char *) Language(160));
} else } else
break; break;
} }
} else {
/*
* Newsmode, automatic addressing to All.
*/
strcpy(Msg.To, "All");
} }
Enter(1); Enter(1);
/* Subject : */ /* Subject : */
pout(14, 0, (char *) Language(161)); pout(YELLOW, BLACK, (char *) Language(161));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB); colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
@ -512,7 +560,7 @@ void Post_Msg()
if((strcmp(Msg.Subject, "")) == 0) { if((strcmp(Msg.Subject, "")) == 0) {
Enter(1); Enter(1);
/* Abort Message [y/N] ?: */ /* Abort Message [y/N] ?: */
pout(3, 0, (char *) Language(162)); pout(CYAN, BLACK, (char *) Language(162));
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
@ -646,27 +694,28 @@ void ShowMsgHdr()
static char Buf1[35], Buf2[35], Buf3[81]; static char Buf1[35], Buf2[35], Buf3[81];
struct tm *tm; struct tm *tm;
time_t now; time_t now;
int color;
Buf1[0] = '\0'; Buf1[0] = '\0';
Buf2[0] = '\0'; Buf2[0] = '\0';
Buf3[0] = '\0'; Buf3[0] = '\0';
clear(); clear();
colour(1,7); colour(BLUE, LIGHTGRAY);
printf(" %-70s", sMsgAreaDesc); printf(" %-70s", sMsgAreaDesc);
colour(4,7); colour(RED, LIGHTGRAY);
printf("#%-5lu\n", Msg.Id); printf("#%-5lu\n", Msg.Id);
/* Date : */ /* Date : */
pout(14, 0, (char *) Language(206)); pout(YELLOW, BLACK, (char *) Language(206));
colour(10, 0); colour(GREEN, BLACK);
/* Use intermediate variable to prevent SIGBUS on Sparc's */ /* Use intermediate variable to prevent SIGBUS on Sparc's */
now = Msg.Written; now = Msg.Written;
tm = gmtime(&now); tm = gmtime(&now);
printf("%02d-%02d-%d %02d:%02d:%02d", tm->tm_mday, tm->tm_mon+1, printf("%02d-%02d-%d %02d:%02d:%02d", tm->tm_mday, tm->tm_mon+1,
tm->tm_year+1900, tm->tm_hour, tm->tm_min, tm->tm_sec); tm->tm_year+1900, tm->tm_hour, tm->tm_min, tm->tm_sec);
colour(12, 0); colour(LIGHTRED, BLACK);
if (Msg.Local) printf(" Local"); if (Msg.Local) printf(" Local");
if (Msg.Intransit) printf(" Transit"); if (Msg.Intransit) printf(" Transit");
if (Msg.Private) printf(" Priv."); if (Msg.Private) printf(" Priv.");
@ -701,38 +750,46 @@ void ShowMsgHdr()
printf("\n"); printf("\n");
/* From : */ /* From : */
pout(14,0, (char *) Language(209)); pout(YELLOW, BLACK, (char *) Language(209));
colour(10, 0); if (IsMe(Msg.From))
color = LIGHTGREEN;
else
color = GREEN;
colour(color++, BLACK);
printf("%s ", Msg.From); printf("%s ", Msg.From);
if (iMsgAreaType != LOCALMAIL) { if (iMsgAreaType != LOCALMAIL) {
colour(11, 0); colour(color, BLACK);
printf("(%s)", Msg.FromAddress); printf("(%s)", Msg.FromAddress);
} }
printf("\n"); printf("\n");
/* To : */ /* To : */
pout(14,0, (char *) Language(208)); pout(YELLOW, BLACK, (char *) Language(208));
colour(10, 0); if (IsMe(Msg.To))
color = LIGHTGREEN;
else
color = GREEN;
colour(color++, BLACK);
printf("%s ", Msg.To); printf("%s ", Msg.To);
if (iMsgAreaType == NETMAIL) { if (iMsgAreaType == NETMAIL) {
colour(11, 0); colour(color, BLACK);
printf("(%s)", Msg.ToAddress); printf("(%s)", Msg.ToAddress);
} }
printf("\n"); printf("\n");
/* Subject : */ /* Subject : */
pout(14,0, (char *) Language(210)); pout(YELLOW, BLACK, (char *) Language(210));
colour(10, 0); colour(GREEN, BLACK);
printf("%s\n", Msg.Subject); printf("%s\n", Msg.Subject);
colour(CFG.HiliteF, CFG.HiliteB); colour(CFG.HiliteF, CFG.HiliteB);
colour(14, 1); colour(YELLOW, BLUE);
if (Msg.Reply) if (Msg.Reply)
sprintf(Buf1, "\"+\" %s %lu", (char *)Language(211), Msg.Reply); sprintf(Buf1, "\"+\" %s %lu", (char *)Language(211), Msg.Reply);
if (Msg.Original) if (Msg.Original)
sprintf(Buf2, " \"-\" %s %lu", (char *)Language(212), Msg.Original); sprintf(Buf2, " \"-\" %s %lu", (char *)Language(212), Msg.Original);
sprintf(Buf3, "%s%s ", Buf1, Buf2); sprintf(Buf3, "%s%s ", Buf1, Buf2);
colour(14, 1); colour(YELLOW, BLUE);
printf("%78s \n", Buf3); printf("%78s \n", Buf3);
} }
@ -755,7 +812,7 @@ int Export_a_Msg(unsigned long Num)
* The area data is already set, so we can do the next things * The area data is already set, so we can do the next things
*/ */
if (MsgBase.Total == 0) { if (MsgBase.Total == 0) {
colour(15, 0); colour(WHITE, BLACK);
/* There are no messages in this area */ /* There are no messages in this area */
printf("\n%s\n\n", (char *) Language(205)); printf("\n%s\n\n", (char *) Language(205));
sleep(3); sleep(3);
@ -769,7 +826,7 @@ int Export_a_Msg(unsigned long Num)
if (!Msg_ReadHeader(Num)) { if (!Msg_ReadHeader(Num)) {
perror(""); perror("");
colour(15, 0); colour(WHITE, BLACK);
printf("\n%s\n\n", (char *)Language(77)); printf("\n%s\n\n", (char *)Language(77));
Msg_Close(); Msg_Close();
sleep(3); sleep(3);
@ -853,7 +910,7 @@ int Read_a_Msg(unsigned long Num, int UpdateLR)
* The area data is already set, so we can do the next things * The area data is already set, so we can do the next things
*/ */
if (MsgBase.Total == 0) { if (MsgBase.Total == 0) {
colour(15, 0); colour(WHITE, BLACK);
/* There are no messages in this area */ /* There are no messages in this area */
printf("\n%s\n\n", (char *) Language(205)); printf("\n%s\n\n", (char *) Language(205));
sleep(3); sleep(3);
@ -867,7 +924,7 @@ int Read_a_Msg(unsigned long Num, int UpdateLR)
if (!Msg_ReadHeader(Num)) { if (!Msg_ReadHeader(Num)) {
perror(""); perror("");
colour(15, 0); colour(WHITE, BLACK);
printf("\n%s\n\n", (char *)Language(77)); printf("\n%s\n\n", (char *)Language(77));
Msg_Close(); Msg_Close();
sleep(3); sleep(3);
@ -1005,7 +1062,8 @@ void Read_Msgs()
colour(CFG.TextColourF, CFG.TextColourB); colour(CFG.TextColourF, CFG.TextColourB);
/* Message area \"%s\" contains %lu messages. */ /* Message area \"%s\" contains %lu messages. */
printf("\n%s\"%s\" %s%lu %s", (char *) Language(221), sMsgAreaDesc, (char *) Language(222), MsgBase.Total, (char *) Language(223)); printf("\n%s\"%s\" %s%lu %s", (char *) Language(221), sMsgAreaDesc,
(char *) Language(222), MsgBase.Total, (char *) Language(223));
/* /*
* Check for lastread pointer, suggest lastread number for start. * Check for lastread pointer, suggest lastread number for start.
@ -1027,7 +1085,7 @@ void Read_Msgs()
Start = MsgBase.Highest; Start = MsgBase.Highest;
} }
colour(15, 0); colour(WHITE, BLACK);
/* Please enter a message between */ /* Please enter a message between */
printf("\n%s(%lu - %lu)", (char *) Language(224), MsgBase.Lowest, MsgBase.Highest); printf("\n%s(%lu - %lu)", (char *) Language(224), MsgBase.Lowest, MsgBase.Highest);
/* Message number [ */ /* Message number [ */
@ -1060,7 +1118,7 @@ int ReadPanel()
WhosDoingWhat(READ_POST); WhosDoingWhat(READ_POST);
colour(15, 4); colour(WHITE, RED);
if (msgs.UsrDelete || exitinfo.Security.level >= CFG.sysop_access) { if (msgs.UsrDelete || exitinfo.Security.level >= CFG.sysop_access) {
/* (A)gain, (N)ext, (L)ast, (R)eply, (E)nter, (D)elete, (Q)uit, e(X)port */ /* (A)gain, (N)ext, (L)ast, (R)eply, (E)nter, (D)elete, (Q)uit, e(X)port */
printf("%s", (char *) Language(214)); printf("%s", (char *) Language(214));
@ -1130,7 +1188,7 @@ int ReadPanel()
} }
} else { } else {
/* Next */ /* Next */
pout(15, 0, (char *) Language(216)); pout(WHITE, BLACK, (char *) Language(216));
if (LastNum < MsgBase.Highest) if (LastNum < MsgBase.Highest)
LastNum++; LastNum++;
else else
@ -1183,9 +1241,9 @@ void Reply_Msg(int IsReply)
x = 0; x = 0;
WhosDoingWhat(READ_POST); WhosDoingWhat(READ_POST);
clear(); clear();
colour(1,7); colour(BLUE, LIGHTGRAY);
printf(" %-71s", sMsgAreaDesc); printf(" %-71s", sMsgAreaDesc);
colour(4,7); colour(RED, LIGHTGRAY);
printf("#%-5lu", MsgBase.Highest + 1); printf("#%-5lu", MsgBase.Highest + 1);
colour(CFG.HiliteF, CFG.HiliteB); colour(CFG.HiliteF, CFG.HiliteB);
@ -1201,21 +1259,21 @@ void Reply_Msg(int IsReply)
/* From : */ /* From : */
sprintf(Msg.From, "%s", exitinfo.sUserName); sprintf(Msg.From, "%s", exitinfo.sUserName);
pout(14, 0, (char *) Language(209)); pout(YELLOW, BLACK, (char *) Language(209));
pout(CFG.MsgInputColourF, CFG.MsgInputColourB, Msg.From); pout(CFG.MsgInputColourF, CFG.MsgInputColourB, Msg.From);
Enter(1); Enter(1);
/* To : */ /* To : */
sprintf(Msg.To, "%s", to); sprintf(Msg.To, "%s", to);
pout(14, 0, (char *) Language(208)); pout(YELLOW, BLACK, (char *) Language(208));
pout(CFG.MsgInputColourF, CFG.MsgInputColourB, Msg.To); pout(CFG.MsgInputColourF, CFG.MsgInputColourB, Msg.To);
Enter(1); Enter(1);
/* Enter to keep Subject. */ /* Enter to keep Subject. */
pout(12, 0, (char *) Language(219)); pout(LIGHTRED, BLACK, (char *) Language(219));
Enter(1); Enter(1);
/* Subject : */ /* Subject : */
pout(14, 0, (char *) Language(210)); pout(YELLOW, BLACK, (char *) Language(210));
sprintf(Msg.Subject, "%s", subj); sprintf(Msg.Subject, "%s", subj);
pout(CFG.MsgInputColourF, CFG.MsgInputColourB, Msg.Subject); pout(CFG.MsgInputColourF, CFG.MsgInputColourB, Msg.Subject);
@ -1342,7 +1400,7 @@ void QuickScan_Msgs()
if (MsgBase.Total == 0) { if (MsgBase.Total == 0) {
Enter(1); Enter(1);
/* There are no messages in this area. */ /* There are no messages in this area. */
pout(15, 0, (char *) Language(205)); pout(WHITE, BLACK, (char *) Language(205));
Enter(3); Enter(3);
sleep(3); sleep(3);
return; return;
@ -1350,26 +1408,26 @@ void QuickScan_Msgs()
clear(); clear();
/* # From To Subject */ /* # From To Subject */
poutCR(14, 1, (char *) Language(220)); poutCR(YELLOW, BLUE, (char *) Language(220));
if (Msg_Open(sMsgAreaBase)) { if (Msg_Open(sMsgAreaBase)) {
for (i = MsgBase.Lowest; i <= MsgBase.Highest; i++) { for (i = MsgBase.Lowest; i <= MsgBase.Highest; i++) {
if (Msg_ReadHeader(i)) { if (Msg_ReadHeader(i)) {
colour(15, 0); colour(WHITE, BLACK);
printf("%-6lu", Msg.Id); printf("%-6lu", Msg.Id);
if (IsMe(Msg.From)) if (IsMe(Msg.From))
colour(11, 0); colour(LIGHTCYAN, BLACK);
else else
colour(3, 0); colour(CYAN, BLACK);
printf("%s ", padleft(Msg.From, 20, ' ')); printf("%s ", padleft(Msg.From, 20, ' '));
if (IsMe(Msg.To)) if (IsMe(Msg.To))
colour(10, 0); colour(LIGHTGREEN, BLACK);
else else
colour(2, 0); colour(GREEN, BLACK);
printf("%s ", padleft(Msg.To, 20, ' ')); printf("%s ", padleft(Msg.To, 20, ' '));
colour(5, 0); colour(MAGENTA, BLACK);
printf("%s", padleft(Msg.Subject, 31, ' ')); printf("%s", padleft(Msg.Subject, 31, ' '));
printf("\n"); printf("\n");
FoundMsg = TRUE; FoundMsg = TRUE;
@ -1383,7 +1441,7 @@ void QuickScan_Msgs()
if(!FoundMsg) { if(!FoundMsg) {
Enter(1); Enter(1);
/* There are no messages in this area. */ /* There are no messages in this area. */
pout(10, 0, (char *) Language(205)); pout(LIGHTGREEN, BLACK, (char *) Language(205));
Enter(2); Enter(2);
sleep(3); sleep(3);
} }
@ -1545,13 +1603,13 @@ void MsgArea_List(char *Option)
if ((Access(exitinfo.Security, msgs.RDSec)) && (msgs.Active)) { if ((Access(exitinfo.Security, msgs.RDSec)) && (msgs.Active)) {
msgs.Name[31] = '\0'; msgs.Name[31] = '\0';
colour(15,0); colour(WHITE, BLACK);
printf("%5d", Recno + 1); printf("%5d", Recno + 1);
colour(9,0); colour(LIGHTBLUE, BLACK);
printf(" %c ", 46); printf(" %c ", 46);
colour(3,0); colour(CYAN, BLACK);
printf("%-31s", msgs.Name); printf("%-31s", msgs.Name);
iAreaCount++; iAreaCount++;
@ -1629,7 +1687,7 @@ void MsgArea_List(char *Option)
/* /*
* Invalid area specified - Please try again ... * Invalid area specified - Please try again ...
*/ */
pout(12, 0, (char *) Language(233)); pout(LIGHTRED, BLACK, (char *) Language(233));
Enter(2); Enter(2);
Pause(); Pause();
fclose(pAreas); fclose(pAreas);
@ -1648,19 +1706,19 @@ void MsgArea_List(char *Option)
if((strlen(msgs.Password)) > 2) { if((strlen(msgs.Password)) > 2) {
Enter(2); Enter(2);
/* Please enter Area Password: */ /* Please enter Area Password: */
pout(15, 0, (char *) Language(233)); pout(WHITE, BLACK, (char *) Language(233));
fflush(stdout); fflush(stdout);
colour(CFG.InputColourF, CFG.InputColourB); colour(CFG.InputColourF, CFG.InputColourB);
GetstrC(temp, 20); GetstrC(temp, 20);
if((strcmp(temp, msgs.Password)) != 0) { if((strcmp(temp, msgs.Password)) != 0) {
Enter(1); Enter(1);
pout(15, 0, (char *) Language(234)); pout(WHITE, BLACK, (char *) Language(234));
Syslog('!', "Incorrect Message Area # %d password given: %s", iMsgAreaNumber, temp); Syslog('!', "Incorrect Message Area # %d password given: %s", iMsgAreaNumber, temp);
SetMsgArea(iOldArea); SetMsgArea(iOldArea);
} else { } else {
Enter(1); Enter(1);
pout(15, 0, (char *) Language(235)); pout(WHITE, BLACK, (char *) Language(235));
Enter(2); Enter(2);
} }
Pause(); Pause();
@ -1679,7 +1737,7 @@ void Delete_MsgNum(unsigned long MsgNum)
{ {
int Result = FALSE; int Result = FALSE;
pout(12, 0, (char *) Language(230)); pout(LIGHTRED, BLACK, (char *) Language(230));
if (Msg_Open(sMsgAreaBase)) { if (Msg_Open(sMsgAreaBase)) {
if (Msg_Lock(15L)) { if (Msg_Lock(15L)) {
@ -1772,9 +1830,9 @@ void CheckMail()
clear(); clear();
/* Checking your mail box ... */ /* Checking your mail box ... */
language(10, 0, 150); language(LIGHTGREEN, BLACK, 150);
Enter(2); Enter(2);
Color = 9; Color = LIGHTBLUE;
fflush(stdout); fflush(stdout);
/* /*
@ -1791,10 +1849,9 @@ void CheckMail()
temp = calloc(PATH_MAX, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
if (exitinfo.Email && strlen(exitinfo.Password)) { if (exitinfo.Email && strlen(exitinfo.Password)) {
check_popmail(exitinfo.Name, exitinfo.Password); check_popmail(exitinfo.Name, exitinfo.Password);
colour(Color, 0); colour(Color++, BLACK);
printf("\re-mail Private e-mail mailbox"); printf("\re-mail Private e-mail mailbox");
fflush(stdout); fflush(stdout);
Color++;
Count = 0; Count = 0;
sprintf(temp, "%s/%s/mailbox", CFG.bbs_usersdir, exitinfo.Name); sprintf(temp, "%s/%s/mailbox", CFG.bbs_usersdir, exitinfo.Name);
SetEmailArea((char *)"mailbox"); SetEmailArea((char *)"mailbox");
@ -1860,10 +1917,10 @@ void CheckMail()
SetMsgArea(iMsgAreaNumber); SetMsgArea(iMsgAreaNumber);
sprintf(temp, "%d", iMsgAreaNumber + 1); sprintf(temp, "%d", iMsgAreaNumber + 1);
colour(Color, 0); colour(Color, 0);
if (Color < 15) if (Color < WHITE)
Color++; Color++;
else else
Color = 9; Color = LIGHTBLUE;
printf("\r%6s %-40s", temp, sMsgAreaDesc); printf("\r%6s %-40s", temp, sMsgAreaDesc);
fflush(stdout); fflush(stdout);
Count = 0; Count = 0;
@ -1914,7 +1971,7 @@ void CheckMail()
putchar('\r'); putchar('\r');
if (Found) { if (Found) {
colour(14, 0); colour(YELLOW, BLACK);
/* You have messages, read your mail now? [Y/n]: */ /* You have messages, read your mail now? [Y/n]: */
printf("\n%s%d %s", (char *) Language(142), Found, (char *) Language(143)); printf("\n%s%d %s", (char *) Language(142), Found, (char *) Language(143));
colour(CFG.InputColourF, CFG.InputColourB); colour(CFG.InputColourF, CFG.InputColourB);
@ -1963,7 +2020,7 @@ void CheckMail()
} }
} }
} else { } else {
language(12, 0, 144); language(LIGHTRED, BLACK, 144);
Enter(1); Enter(1);
sleep(3); sleep(3);
} /* if (Found) */ } /* if (Found) */
@ -1994,7 +2051,7 @@ void MailStatus()
OldMsgArea = iMsgAreaNumber; OldMsgArea = iMsgAreaNumber;
iMsgAreaNumber = 0; iMsgAreaNumber = 0;
clear(); clear();
colour(14, 1); colour(YELLOW, BLUE);
/* Area Type Description Messages Personal */ /* Area Type Description Messages Personal */
printf("%-79s", (char *)Language(226)); printf("%-79s", (char *)Language(226));
Enter(1); Enter(1);
@ -2012,16 +2069,16 @@ void MailStatus()
case 2: SetEmailArea((char *)"trash"); case 2: SetEmailArea((char *)"trash");
break; break;
} }
colour(12, 0); colour(LIGHTRED, BLACK);
printf(" Email"); printf(" Email");
colour(11, 0); colour(LIGHTCYAN, BLACK);
printf(" %-40s", Language(467 + i)); printf(" %-40s", Language(467 + i));
colour(14, 0); colour(YELLOW, BLACK);
if (EmailBase.Highest) if (EmailBase.Highest)
printf(" %8lu", EmailBase.Highest - EmailBase.Lowest + 1); printf(" %8lu", EmailBase.Highest - EmailBase.Lowest + 1);
else else
printf(" 0"); printf(" 0");
colour(9, 0); colour(LIGHTBLUE, BLACK);
if (EmailBase.Highest) if (EmailBase.Highest)
printf(" %8lu\n", EmailBase.Highest - EmailBase.Lowest + 1); printf(" %8lu\n", EmailBase.Highest - EmailBase.Lowest + 1);
else else
@ -2050,9 +2107,9 @@ void MailStatus()
if ((msgs.Active) && (exitinfo.Security.level >= msgs.RDSec.level)) { if ((msgs.Active) && (exitinfo.Security.level >= msgs.RDSec.level)) {
SetMsgArea(iMsgAreaNumber); SetMsgArea(iMsgAreaNumber);
sprintf(temp, "%d", iMsgAreaNumber + 1); sprintf(temp, "%d", iMsgAreaNumber + 1);
colour(15, 0); colour(WHITE, BLACK);
printf("%5s", temp); printf("%5s", temp);
colour(12, 0); colour(LIGHTRED, BLACK);
switch(msgs.Type) { switch(msgs.Type) {
case LOCALMAIL: case LOCALMAIL:
printf(" Local"); printf(" Local");
@ -2070,7 +2127,7 @@ void MailStatus()
printf(" News "); printf(" News ");
break; break;
} }
colour(11, 0); colour(LIGHTCYAN, BLACK);
printf(" %-40s", sMsgAreaDesc); printf(" %-40s", sMsgAreaDesc);
Count = 0; Count = 0;
@ -2084,12 +2141,12 @@ void MailStatus()
Msg_Close(); Msg_Close();
} else } else
WriteError("Error open JAM %s", sMsgAreaBase); WriteError("Error open JAM %s", sMsgAreaBase);
colour(14, 0); colour(YELLOW, BLACK);
if (MsgBase.Highest) if (MsgBase.Highest)
printf(" %8lu", MsgBase.Highest - MsgBase.Lowest + 1); printf(" %8lu", MsgBase.Highest - MsgBase.Lowest + 1);
else else
printf(" 0"); printf(" 0");
colour(9, 0); colour(LIGHTBLUE, BLACK);
printf(" %8d\n", Count); printf(" %8d\n", Count);
if (LC(1)) if (LC(1))
break; break;
@ -2156,4 +2213,3 @@ void SetMsgArea(unsigned long AreaNum)
} }