From 73f227e54147c212f019ce3eea971ee0f18d86e4 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 13 Apr 2016 20:49:28 +1000 Subject: [PATCH] Automatically ad FTN address to orgin line on fido conferences --- mail_menu.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mail_menu.c b/mail_menu.c index bfa0db2..d42d598 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -363,8 +363,20 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from } } - snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s \r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline); - + if (conf.mail_conferences[user->cur_mail_conf]->nettype == NETWORK_FIDO) { + if (conf.mail_conferences[user->cur_mail_conf]->fidoaddr->point == 0) { + snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s (%d:%d/%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone, + conf.mail_conferences[user->cur_mail_conf]->fidoaddr->net, + conf.mail_conferences[user->cur_mail_conf]->fidoaddr->node); + } else { + snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s (%d:%d/%d.%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone, + conf.mail_conferences[user->cur_mail_conf]->fidoaddr->net, + conf.mail_conferences[user->cur_mail_conf]->fidoaddr->node, + conf.mail_conferences[user->cur_mail_conf]->fidoaddr->point); + } + } else { + snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s \r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline); + } body2 = (char *)malloc(totlen + 2 + strlen(buffer)); j = 0;