From 62466e1860abcf6e9d642f0c6017b8e109affc20 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Tue, 20 Feb 2018 05:23:25 +0000 Subject: [PATCH] In system information ('I' from the Info: prompt), don't display the system.msg or logon.asc if they don't exist. --- src/sbbs3/str.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/sbbs3/str.cpp b/src/sbbs3/str.cpp index 4025ed4eec..f37020131c 100644 --- a/src/sbbs3/str.cpp +++ b/src/sbbs3/str.cpp @@ -850,6 +850,7 @@ char* sbbs_t::datestr(time_t t) void sbbs_t::sys_info() { char tmp[128]; + char path[MAX_PATH+1]; uint i; stats_t stats; @@ -875,12 +876,13 @@ void sbbs_t::sys_info() bprintf(text[SiTotalTime],ultoac(stats.timeon,tmp)); bprintf(text[SiTimeToday],ultoac(stats.ttoday,tmp)); ver(); - if(text[ViewSysInfoFileQ][0] && yesno(text[ViewSysInfoFileQ])) { + SAFEPRINTF(path, "%ssystem.msg", cfg.text_dir); + if(fexistcase(path) && text[ViewSysInfoFileQ][0] && yesno(text[ViewSysInfoFileQ])) { CLS; - sprintf(tmp,"%ssystem.msg", cfg.text_dir); - printfile(tmp,0); + printfile(path,0); } - if(text[ViewLogonMsgQ][0] && yesno(text[ViewLogonMsgQ])) { + SAFEPRINTF(path, "%smenu/logon.asc", cfg.text_dir); + if(fexistcase(path) && text[ViewLogonMsgQ][0] && yesno(text[ViewLogonMsgQ])) { CLS; menu("logon"); } -- GitLab