Fixed subject first character capitalize

This commit is contained in:
Michiel Broek 2003-07-11 20:28:36 +00:00
parent 14ff0c439d
commit eca95541e5
3 changed files with 184 additions and 186 deletions

View File

@ -47,6 +47,8 @@ v0.37.4 10-May-2003
mbsebbs: mbsebbs:
Increased internal message buffer size to 700 lines. Increased internal message buffer size to 700 lines.
Fullscreen editor code cleanup, debug messages removed. Fullscreen editor code cleanup, debug messages removed.
When entering a message, the first character of the subject
line was capitalized.
mbsetup: mbsetup:
In menu 1.14 added a switch to turn MD5 crypted passwords off. In menu 1.14 added a switch to turn MD5 crypted passwords off.

View File

@ -743,7 +743,6 @@ void Reply_Email(int IsReply)
if (strlen(subj)) if (strlen(subj))
strcpy(Msg.Subject, subj); strcpy(Msg.Subject, subj);
tlf(Msg.Subject);
Msg.Private = TRUE; Msg.Private = TRUE;
Enter(1); Enter(1);
@ -873,7 +872,6 @@ void Write_Email(void)
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
GetstrP(Msg.Subject, 65, 0); GetstrP(Msg.Subject, 65, 0);
tlf(Msg.Subject);
if((strcmp(Msg.Subject, "")) == 0) { if((strcmp(Msg.Subject, "")) == 0) {
Enter(1); Enter(1);

View File

@ -5,7 +5,7 @@
* Todo ..................: Implement message groups. * Todo ..................: Implement message groups.
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2002 * Copyright (C) 1997-2003
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -396,205 +396,204 @@ int Edit_Msg()
*/ */
void Post_Msg() void Post_Msg()
{ {
int i, x; int i, x;
char *FidoNode; char *FidoNode;
faddr *Dest = NULL; faddr *Dest = NULL;
node *Nlent; node *Nlent;
unsigned short point; unsigned short point;
Line = 1; Line = 1;
WhosDoingWhat(READ_POST); WhosDoingWhat(READ_POST);
SetMsgArea(iMsgAreaNumber); SetMsgArea(iMsgAreaNumber);
clear(); clear();
if (!Post_Allowed()) if (!Post_Allowed())
return; return;
for (i = 0; i < (TEXTBUFSIZE + 1); i++) for (i = 0; i < (TEXTBUFSIZE + 1); i++)
Message[i] = (char *) calloc(81, sizeof(char)); Message[i] = (char *) calloc(81, sizeof(char));
Line = 1; Line = 1;
Msg_New(); Msg_New();
colour(LIGHTBLUE, BLACK); 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);
if (Alias_Option()) { if (Alias_Option()) {
/* /*
* Set Handle * Set Handle
*/ */
strcpy(Msg.From, exitinfo.sHandle); strcpy(Msg.From, exitinfo.sHandle);
tlcap(Msg.From); // Do we want this??? tlcap(Msg.From); // Do we want this???
/* From : */ /* From : */
pout(YELLOW, BLACK, (char *) Language(157)); pout(YELLOW, BLACK, (char *) Language(157));
} else { } else {
/* /*
* Normal from address, no alias * Normal from address, no alias
*/ */
/* From : */ /* From : */
pout(YELLOW, BLACK, (char *) Language(157)); pout(YELLOW, BLACK, (char *) Language(157));
if (msgs.Type == NEWS) { if (msgs.Type == NEWS) {
if (CFG.EmailMode != E_PRMISP) { if (CFG.EmailMode != E_PRMISP) {
/* /*
* If no internet mail domain, use fidonet addressing. * If no internet mail domain, use fidonet addressing.
*/ */
Dest = fido2faddr(CFG.EmailFidoAka); Dest = fido2faddr(CFG.EmailFidoAka);
strcpy(Msg.From, exitinfo.sUserName);
tlcap(Msg.From);
} else {
sprintf(Msg.From, "%s@%s (%s)", exitinfo.Name, CFG.sysdomain, exitinfo.sUserName);
}
} else {
strcpy(Msg.From, exitinfo.sUserName); strcpy(Msg.From, exitinfo.sUserName);
tlcap(Msg.From); tlcap(Msg.From);
} else {
sprintf(Msg.From, "%s@%s (%s)", exitinfo.Name, CFG.sysdomain, exitinfo.sUserName);
} }
}
pout(CFG.MsgInputColourF, CFG.MsgInputColourB, Msg.From);
Syslog('b', "Setting From: %s", Msg.From);
if ((msgs.Type == NEWS) || (msgs.Type == LIST)) {
/*
* Newsmode or maillist mode, automatic addressing to All.
* */
strcpy(Msg.To, "All");
} else { } else {
while (TRUE) { strcpy(Msg.From, exitinfo.sUserName);
Enter(1); tlcap(Msg.From);
/* To : */
pout(YELLOW, BLACK, (char *) Language(158));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
Getname(Msg.To, 35);
if ((strcmp(Msg.To, "")) == 0) {
for(i = 0; i < (TEXTBUFSIZE + 1); i++)
free(Message[i]);
return;
}
if ((strcasecmp(Msg.To, "sysop")) == 0)
strcpy(Msg.To, CFG.sysop_name);
/*
* Localmail and Echomail may be addressed to All
*/
if ((msgs.Type == LOCALMAIL) || (msgs.Type == ECHOMAIL) || (msgs.Type == LIST)) {
if (strcasecmp(Msg.To, "all") == 0)
x = TRUE;
else {
/*
* Local users must exist in the userbase.
*/
if (msgs.Type == LOCALMAIL) {
/* Verifying user ... */
pout(CYAN, BLACK, (char *) Language(159));
x = CheckUser(Msg.To);
} else
x = TRUE;
}
} else if (msgs.Type == NETMAIL) {
x = FALSE;
pout(YELLOW, BLACK, (char *)"Address : ");
FidoNode = calloc(61, sizeof(char));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
GetstrC(FidoNode, 60);
if ((Dest = parsefnode(FidoNode)) != NULL) {
point = Dest->point;
Dest->point = 0;
if (((Nlent = getnlent(Dest)) != NULL) && (Nlent->addr.zone)) {
colour(YELLOW, BLACK);
if (point)
printf("Boss : ");
else
printf("Node : ");
Dest->point = point;
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
printf("%s in %s", Nlent->name, Nlent->location);
colour(14, 0);
printf(" Is this correct Y/N: ");
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
fflush(stdout);
alarm_on();
if (toupper(Getone()) == 'Y') {
Enter(1);
sprintf(Msg.ToAddress, "%s", ascfnode(Dest, 0x1f));
x = TRUE;
switch (Crash_Option(Dest)) {
case 1: Msg.Crash = TRUE;
break;
case 2: Msg.Immediate = TRUE;
break;
}
}
} else {
Dest->point = point;
printf("\r");
pout(CYAN, BLACK, (char *) Language(241));
fflush(stdout);
alarm_on();
if (toupper(Getone()) == Keystroke(241, 0)) {
x = TRUE;
Syslog('+', "Node %s not found, forced continue", FidoNode);
}
}
} else {
Syslog('m', "Can't parse address %s", FidoNode);
}
free(FidoNode);
} else {
x = FALSE;
}
if(!x) {
printf("\r");
/* User not found. Try again, or (Enter) to quit */
pout(CYAN, BLACK, (char *) Language(160));
} else
break;
}
} }
}
pout(CFG.MsgInputColourF, CFG.MsgInputColourB, Msg.From);
Syslog('b', "Setting From: %s", Msg.From);
if ((msgs.Type == NEWS) || (msgs.Type == LIST)) {
/*
* Newsmode or maillist mode, automatic addressing to All.
* */
strcpy(Msg.To, "All");
} else {
while (TRUE) {
Enter(1);
/* To : */
pout(YELLOW, BLACK, (char *) Language(158));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
Getname(Msg.To, 35);
if ((strcmp(Msg.To, "")) == 0) {
for(i = 0; i < (TEXTBUFSIZE + 1); i++)
free(Message[i]);
return;
}
if ((strcasecmp(Msg.To, "sysop")) == 0)
strcpy(Msg.To, CFG.sysop_name);
/*
* Localmail and Echomail may be addressed to All
*/
if ((msgs.Type == LOCALMAIL) || (msgs.Type == ECHOMAIL) || (msgs.Type == LIST)) {
if (strcasecmp(Msg.To, "all") == 0)
x = TRUE;
else {
/*
* Local users must exist in the userbase.
*/
if (msgs.Type == LOCALMAIL) {
/* Verifying user ... */
pout(CYAN, BLACK, (char *) Language(159));
x = CheckUser(Msg.To);
} else
x = TRUE;
}
} else if (msgs.Type == NETMAIL) {
x = FALSE;
pout(YELLOW, BLACK, (char *)"Address : ");
FidoNode = calloc(61, sizeof(char));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
GetstrC(FidoNode, 60);
if ((Dest = parsefnode(FidoNode)) != NULL) {
point = Dest->point;
Dest->point = 0;
if (((Nlent = getnlent(Dest)) != NULL) && (Nlent->addr.zone)) {
colour(YELLOW, BLACK);
if (point)
printf("Boss : ");
else
printf("Node : ");
Dest->point = point;
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
printf("%s in %s", Nlent->name, Nlent->location);
colour(14, 0);
printf(" Is this correct Y/N: ");
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
fflush(stdout);
alarm_on();
if (toupper(Getone()) == 'Y') {
Enter(1);
sprintf(Msg.ToAddress, "%s", ascfnode(Dest, 0x1f));
x = TRUE;
switch (Crash_Option(Dest)) {
case 1: Msg.Crash = TRUE;
break;
case 2: Msg.Immediate = TRUE;
break;
}
}
} else {
Dest->point = point;
printf("\r");
pout(CYAN, BLACK, (char *) Language(241));
fflush(stdout);
alarm_on();
if (toupper(Getone()) == Keystroke(241, 0)) {
x = TRUE;
Syslog('+', "Node %s not found, forced continue", FidoNode);
}
}
} else {
Syslog('m', "Can't parse address %s", FidoNode);
}
free(FidoNode);
} else {
x = FALSE;
}
if(!x) {
printf("\r");
/* User not found. Try again, or (Enter) to quit */
pout(CYAN, BLACK, (char *) Language(160));
} else
break;
}
}
Enter(1);
/* Subject : */
pout(YELLOW, BLACK, (char *) Language(161));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
fflush(stdout);
alarm_on();
GetstrP(Msg.Subject, 65, 0);
if ((strcmp(Msg.Subject, "")) == 0) {
Enter(1); Enter(1);
/* Subject : */ /* Abort Message [y/N] ?: */
pout(YELLOW, BLACK, (char *) Language(161)); pout(CYAN, BLACK, (char *) Language(162));
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
fflush(stdout); fflush(stdout);
alarm_on(); alarm_on();
GetstrP(Msg.Subject, 65, 0);
tlf(Msg.Subject);
if((strcmp(Msg.Subject, "")) == 0) { if (toupper(Getone()) == Keystroke(162, 0)) {
Enter(1); for(i = 0; i < (TEXTBUFSIZE + 1); i++)
/* Abort Message [y/N] ?: */
pout(CYAN, BLACK, (char *) Language(162));
fflush(stdout);
alarm_on();
if (toupper(Getone()) == Keystroke(162, 0)) {
for(i = 0; i < (TEXTBUFSIZE + 1); i++)
free(Message[i]);
return;
}
}
/*
* If not addressed to "all" and the area is Private/Public we
* ask the user for the private flag.
*/
if ((strcasecmp(Msg.To, "all")) != 0)
Msg.Private = IsPrivate();
Check_Attach();
if (Edit_Msg())
Save_Msg(FALSE, Dest);
for (i = 0; i < (TEXTBUFSIZE + 1); i++)
free(Message[i]); free(Message[i]);
return;
}
}
/*
* If not addressed to "all" and the area is Private/Public we
* ask the user for the private flag.
*/
if ((strcasecmp(Msg.To, "all")) != 0)
Msg.Private = IsPrivate();
Check_Attach();
if (Edit_Msg())
Save_Msg(FALSE, Dest);
for (i = 0; i < (TEXTBUFSIZE + 1); i++)
free(Message[i]);
} }
@ -1379,7 +1378,6 @@ void Reply_Msg(int IsReply)
if (strlen(subj)) if (strlen(subj))
strcpy(Msg.Subject, subj); strcpy(Msg.Subject, subj);
tlf(Msg.Subject);
Msg.Private = IsPrivate(); Msg.Private = IsPrivate();
Enter(1); Enter(1);