From bd7486f1abcbe2173a5133c6451b3905e3ba8c8c Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 25 Mar 2016 08:20:39 +1000 Subject: [PATCH] Added from address to read mail --- mail_menu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mail_menu.c b/mail_menu.c index a7c1357..837bc0b 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -309,8 +309,11 @@ void read_message(int socket, struct user_record *user, int mailno) { } - - sprintf(buffer, "\e[2J\e[1;32mFrom : \e[1;37m%s\r\n", from); + if (from_addr != NULL) { + sprintf(buffer, "\e[2J\e[1;32mFrom : \e[1;37m%s (%d:%d/%d.%d)\r\n", from, from_addr->zone, from_addr->net, from_addr->node, from_addr->point); + } else { + sprintf(buffer, "\e[2J\e[1;32mFrom : \e[1;37m%s\r\n", from); + } s_putstring(socket, buffer); sprintf(buffer, "\e[1;32mTo : \e[1;37m%s\r\n", to); s_putstring(socket, buffer);