diff --git a/src/www_msgs.c b/src/www_msgs.c
index c22be90..798f680 100644
--- a/src/www_msgs.c
+++ b/src/www_msgs.c
@@ -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, "
From: %s (%s)
\n", from_s, oaddress);
+
+ if (conf.mail_conferences[conference]->nettype == NETWORK_MAGI) {
+ sprintf(buffer, "From: %s (@%s)
\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, "From: %s (%s)
\n", from_s, oaddress);
+ } else {
+ sprintf(buffer, "From: %s (%s - %s)
\n", from_s, oaddress, nodename);
+ }
+ free(nodename);
+ free(nodeno);
+ } else {
+ sprintf(buffer, "From: %s (%s)
\n", from_s, oaddress);
+ }
+ } else {
+ sprintf(buffer, "From: %s (%s)
\n", from_s, oaddress);
+ }
} else {
sprintf(buffer, "From: %s
\n", from_s);
}