From 7cca518dfc072d3323dbf649dcaae59f2be992c6 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Thu, 24 May 2018 20:10:33 +1000 Subject: [PATCH] another little fix --- utils/mnetftn/ftntomnet.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/utils/mnetftn/ftntomnet.c b/utils/mnetftn/ftntomnet.c index 77fbcd5..c99fce7 100644 --- a/utils/mnetftn/ftntomnet.c +++ b/utils/mnetftn/ftntomnet.c @@ -297,6 +297,16 @@ int export_messages(int area) { msg.area = areas[area]->id; msg.type = 0; + + for (i=strlen(body) -2; i > 0; i--) { + if (body[i] == '\r') { + sprintf(buffer, "\r * Origin: ftn->mnet (%d)\r", mynode); + body = realloc(body, strlen(body) + strlen(buffer) + 1); + strcpy(&body[i], buffer); + break; + } + } + if (areas[area]->hub == mynode) { for (n = 0; n < areas[area]->link_count; n++) { if (imhub) { @@ -370,7 +380,7 @@ int main(int argc, char **argv) { int l; if (argc < 2) { - fprintf(stderr, "Usage ./mnetscan mnet.cfg\n"); + fprintf(stderr, "Usage ./ftntomnet mnet.cfg\n"); return -1; }