int format_type = 0;
int fr = 0;
int nhdr = 0;
+ int have_rfca = 0;
sigcaught = 0;
sttybbs(1);
}
strcpy(m_subject,"");
+ strcpy(reply_to, "nobody ... xxxxx");
printf("\n");
++lines_printed;
lines_printed = checkpagin(lines_printed,pagin,screenheight);
return(0);
}
- strcpy(reply_to,"nobody...xxxxx");
while(serv_gets(buf), struncmp(buf,"text",4)) {
if (!struncmp(buf,"nhdr=yes",8)) nhdr=1;
if (!struncmp(buf,"from=",5)) {
strcpy(m_subject,&buf[5]);
if (!struncmp(buf,"rfca=",5)) {
+ strcpy(reply_to, &buf[5]);
+ have_rfca = 1;
color(DIM_WHITE);
printf("<");
color(BRIGHT_BLUE);
printf("> ");
}
if ((!struncmp(buf,"hnod=",5))
- && (strucmp(&buf[5],serv_info.serv_humannode))) {
+ && (strucmp(&buf[5],serv_info.serv_humannode))
+ && (have_rfca == 0) ) {
color(DIM_WHITE);
printf("(");
color(BRIGHT_WHITE);
printf(") ");
}
if ((!struncmp(buf,"room=",5))
- && (strucmp(&buf[5],room_name))) {
+ && (strucmp(&buf[5],room_name))
+ && (have_rfca == 0)) {
color(DIM_WHITE);
printf("in ");
color(BRIGHT_MAGENTA);
if (!struncmp(buf,"node=",5)) {
if ( (room_flags&QR_NETWORK)
|| ((strucmp(&buf[5],serv_info.serv_nodename)
- &&(strucmp(&buf[5],serv_info.serv_fqdn)))))
+ &&(strucmp(&buf[5],serv_info.serv_fqdn)))) )
{
- color(DIM_WHITE);
- printf("@");
- color(BRIGHT_YELLOW);
- printf("%s ",&buf[5]);
+ if (have_rfca == 0) {
+ color(DIM_WHITE);
+ printf("@");
+ color(BRIGHT_YELLOW);
+ printf("%s ",&buf[5]);
}
- if ((!strucmp(&buf[5],serv_info.serv_nodename))
+ }
+ if (have_rfca == 0) {
+ if ((!strucmp(&buf[5],serv_info.serv_nodename))
||(!strucmp(&buf[5],serv_info.serv_fqdn)))
{
strcpy(reply_to,from);
}
+ }
else {
sprintf(reply_to,"%s @ %s",from,&buf[5]);
}
#include "tools.h"
#include "mime_parser.h"
#include "html.h"
+#include "genstamp.h"
#define desired_section ((char *)CtdlGetUserData(SYM_DESIRED_SECTION))
#define ma ((struct ma_info *)CtdlGetUserData(SYM_MA_INFO))
int do_proto, /* do Citadel protocol responses? */
int crlf /* Use CRLF newlines instead of LF? */
) {
- int a, i, k;
+ int i, k;
char buf[1024];
- time_t xtime;
CIT_UBYTE ch;
char allkeys[256];
char display_name[256];
char snode[256];
char lnode[256];
char mid[256];
+ char datestamp[256];
/* */
lprintf(7, "CtdlOutputMsg() msgnum=%ld, mode=%d\n",
if (i == 'A') {
strcpy(luser, mptr);
- } else if (i == 'P') {
- cprintf("Path: %s%s", mptr, nl);
- for (a = 0; a < strlen(mptr); ++a) {
- if (mptr[a] == '!') {
- strcpy(mptr, &mptr[a + 1]);
- a = 0;
- }
- }
strcpy(suser, mptr);
- } else if (i == 'U')
+ }
+ else if (i == 'P') {
+ cprintf("Path: %s%s", mptr, nl);
+ }
+ else if (i == 'U')
cprintf("Subject: %s%s", mptr, nl);
else if (i == 'I')
strcpy(mid, mptr);
else if (i == 'R')
cprintf("To: %s%s", mptr, nl);
else if (i == 'T') {
- xtime = atol(mptr);
- cprintf("Date: %s", asctime(localtime(&xtime)));
+ generate_rfc822_datestamp(datestamp,
+ atol(mptr) );
+ cprintf("Date: %s%s", datestamp, nl);
}
}
}
}
+ for (i=0; i<strlen(suser); ++i) {
+ suser[i] = tolower(suser[i]);
+ if (!isalnum(suser[i])) suser[i]='_';
+ }
+
if (mode == MT_RFC822) {
if (!strcasecmp(snode, NODENAME)) {
strcpy(snode, FQDN);
++num_threads;
- tv.tv_sec = 60; /* wake up every minute if no input */
- tv.tv_usec = 0;
-
while (!time_to_die) {
/*
}
end_critical_section(S_SESSION_TABLE);
+ tv.tv_sec = 60; /* wake up every minute if no input */
+ tv.tv_usec = 0;
retval = select(highest + 1, &readfds, NULL, NULL, &tv);
/* Now figure out who made this select() unblock.