Skip to content
Snippets Groups Projects
Commit 814b745f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Print the upload TCP protocol (when available) w/user name, not host/IP

Long hostnames would prevent the protocol from being shown. Also, non-operators should be able to see the protocol used to upload files.
parent d89c5b7b
No related branches found
No related tags found
No related merge requests found
......@@ -69,8 +69,11 @@ void sbbs_t::showfileinfo(file_t* f, bool show_extdesc)
if(f->author_org)
bprintf(P_TRUNCATE, text[FiGroup], f->author_org);
char* p = f->hdr.attr&MSG_ANONYMOUS ? text[UNKNOWN_USER] : f->from;
if(p != NULL && *p != '\0')
if(p != NULL && *p != '\0') {
bprintf(P_TRUNCATE, text[FiUploadedBy], p);
if(f->from_prot != NULL)
bprintf(P_TRUNCATE, " via %s ", f->from_prot);
}
if(is_op) {
*tmp = '\0';
if(f->from_ip != NULL)
......@@ -79,10 +82,6 @@ void sbbs_t::showfileinfo(file_t* f, bool show_extdesc)
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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment