diff --git a/doors.c b/doors.c index 12a5539..0b2a959 100644 --- a/doors.c +++ b/doors.c @@ -201,7 +201,7 @@ void rundoor(int socket, struct user_record *user, char *cmd, int stdio) { return; } if (c == '\r') { - c == '\n'; + c = '\n'; } else if (c == '\n' || c == '\0') { continue; } diff --git a/mail_menu.c b/mail_menu.c index d26bea6..a230cf7 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -289,7 +289,11 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from sprintf(buffer, "%s/node%d/MSGINF", conf.bbs_path, mynode); fptr = fopen(buffer, "w"); fprintf(fptr, "%s\r\n", user->loginname); - fprintf(fptr, "%s\r\n", to); + if (qfrom != NULL) { + fprintf(fptr, "%s\r\n", qfrom); + } else { + fprintf(fptr, "%s\r\n", to); + } fprintf(fptr, "%s\r\n", subject); fprintf(fptr, "0\r\n"); if (email == 1) { @@ -761,7 +765,11 @@ void read_message(int socket, struct user_record *user, struct msg_headers *msgh s_putstring(socket, "\r\nSorry, you are not allowed to post in this area\r\n"); } else { if (msghs->msgs[mailno]->subject != NULL) { - sprintf(buffer, "RE: %s", msghs->msgs[mailno]->subject); + if (strncasecmp(msghs->msgs[mailno]->subject, "RE:", 3) != 0) { + snprintf(buffer, 256, "RE: %s", msghs->msgs[mailno]->subject); + } else { + snprintf(buffer, 256, "%s", msghs->msgs[mailno]->subject); + } } subject = (char *)malloc(strlen(buffer) + 1); strcpy(subject, buffer);