From 215e5ae2233df99fc359b5e9bdf9c5fd3747b7ef Mon Sep 17 00:00:00 2001 From: Rick L Bird Date: Sat, 14 May 2011 13:02:31 -0400 Subject: [PATCH] PennMUSH 1.8.3p12 Author: allthecoolkidshaveone Date: Wed Jan 6 16:23:28 2010 +0000 Issue 26: Allow for / in @mail subjects. Fixes #179 --- src/extmail.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/extmail.c b/src/extmail.c index b925a55..838c4d0 100644 --- a/src/extmail.c +++ b/src/extmail.c @@ -850,9 +850,18 @@ do_mail_send(dbref player, char *tolist, char *message, mail_flag flags, } sb = sbuf; mb = message; /* Save the message pointer */ - while (*message && (i < SUBJECT_LEN) && *message != SUBJECT_COOKIE) { - *sb++ = *message++; - i++; + while (*message && (i < SUBJECT_LEN)) { + if (*message == SUBJECT_COOKIE) { + if (*(message + 1) == SUBJECT_COOKIE) { + *sb++ = *message; + message += 2; + i += 1; + } else + break; + } else { + *sb++ = *message++; + i += 1; + } } *sb = '\0'; if (*message && (*message == SUBJECT_COOKIE)) { @@ -860,10 +869,6 @@ do_mail_send(dbref player, char *tolist, char *message, mail_flag flags, subject_given = 1; } else message = mb; /* Rewind the pointer to the beginning */ -#ifdef ALLOW_NOSUBJECT - if (!subject_given) - strcpy(sbuf, T("(no subject)")); -#endif /* Parse the player list */ head = tolist; while (head && *head) { -- 2.30.2