From 1a1025b0a9452c1d9f05fa774c09cf433d6e2166 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 25 Oct 2018 21:25:53 +0000 Subject: [PATCH] New @-code: CONDMENU (conditional menu) - displays a menu/display file only if it exists (on disk) and displays no error message if the file does not exist. Nearly identical to the existing MENU @-Code, but without the need to insure the file actually exists first. --- src/sbbs3/atcodes.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sbbs3/atcodes.cpp b/src/sbbs3/atcodes.cpp index 5e8e383c95..7adab8290f 100644 --- a/src/sbbs3/atcodes.cpp +++ b/src/sbbs3/atcodes.cpp @@ -647,6 +647,11 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen) return(nulstr); } + if(!strncmp(sp,"CONDMENU:",9)) { + menu(sp+9, P_NOERROR); + return(nulstr); + } + if(!strncmp(sp,"TYPE:",5)) { printfile(cmdstr(sp+5,nulstr,nulstr,str),0); return(nulstr); -- GitLab