From 7e2e21c66a4109acb367a5214dc085c7a2c0c8c8 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Sun, 25 Apr 2021 19:33:22 -0700
Subject: [PATCH] Consolidate the uploader security info (host/ip/prot) on one
 line

---
 src/sbbs3/file.cpp | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/sbbs3/file.cpp b/src/sbbs3/file.cpp
index 1a59650b9b..2b7c87aedb 100644
--- a/src/sbbs3/file.cpp
+++ b/src/sbbs3/file.cpp
@@ -72,12 +72,19 @@ void sbbs_t::showfileinfo(file_t* f, bool show_extdesc)
 	if(p != NULL && *p != '\0')
 		bprintf(P_TRUNCATE, text[FiUploadedBy], p);
 	if(is_op) {
+		*tmp = '\0';
 		if(f->from_ip != NULL)
-			bprintf(P_TRUNCATE, text[FiUploadedBy], f->from_ip);
-		if(f->from_host != NULL)
-			bprintf(P_TRUNCATE, text[FiUploadedBy], f->from_host);
-		if(f->from_prot != NULL)
-			bprintf(P_TRUNCATE, text[FiUploadedBy], f->from_prot);
+			SAFEPRINTF(tmp, "[%s] ", f->from_ip);
+		if(f->from_host != NULL) {
+			SAFEPRINTF(tmp2, "%s ", f->from_host);
+			SAFECAT(tmp, tmp2);
+		}
+		if(f->from_prot != NULL) {
+			SAFEPRINTF(tmp2, "via %s ", f->from_prot);
+			SAFECAT(tmp, tmp2);
+		}
+		if(*tmp != '\0')
+			bprintf(P_TRUNCATE, text[FiUploadedBy], tmp);
 	}
 	if(f->to_list != NULL && *f->to_list != '\0')
 		bprintf(P_TRUNCATE, text[FiUploadedTo], f->to_list);
-- 
GitLab