updated to include bbs name if known from nodelist
This commit is contained in:
parent
9e816f05f6
commit
fb90c8b397
@ -296,6 +296,8 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
|
||||
int l1, l2;
|
||||
char *aha_text;
|
||||
char *aha_out;
|
||||
char *nodename;
|
||||
struct fidoaddr *nodeno;
|
||||
|
||||
if (conference < 0 || conference >= conf.mail_conference_count || area < 0 || area >= conf.mail_conferences[conference]->mail_area_count) {
|
||||
return NULL;
|
||||
@ -462,7 +464,26 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
|
||||
|
||||
from_s = www_sanitize(from);
|
||||
if (conf.mail_conferences[conference]->mail_areas[area]->type != TYPE_LOCAL_AREA && oaddress != NULL) {
|
||||
sprintf(buffer, "<div class=\"msg-view-from\">From: %s (%s)</div>\n", from_s, oaddress);
|
||||
|
||||
if (conf.mail_conferences[conference]->nettype == NETWORK_MAGI) {
|
||||
sprintf(buffer, "<div class=\"msg-view-from\">From: %s (@%s)</div>\n", from_s, oaddress);
|
||||
} else if (conf.mail_conferences[conference]->nettype == NETWORK_FIDO) {
|
||||
nodeno = parse_fido_addr(oaddress);
|
||||
if (nodeno != NULL) {
|
||||
nodename = nl_get_bbsname(nodeno, conf.mail_conferences[conference]->domain);
|
||||
if (strcmp(nodename, "Unknown") == 0) {
|
||||
sprintf(buffer, "<div class=\"msg-view-from\">From: %s (%s)</div>\n", from_s, oaddress);
|
||||
} else {
|
||||
sprintf(buffer, "<div class=\"msg-view-from\">From: %s (%s - %s)</div>\n", from_s, oaddress, nodename);
|
||||
}
|
||||
free(nodename);
|
||||
free(nodeno);
|
||||
} else {
|
||||
sprintf(buffer, "<div class=\"msg-view-from\">From: %s (%s)</div>\n", from_s, oaddress);
|
||||
}
|
||||
} else {
|
||||
sprintf(buffer, "<div class=\"msg-view-from\">From: %s (%s)</div>\n", from_s, oaddress);
|
||||
}
|
||||
} else {
|
||||
sprintf(buffer, "<div class=\"msg-view-from\">From: %s</div>\n", from_s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user