From ad12b9b21236615ae51b0112ba7e0a0563d2a3f8 Mon Sep 17 00:00:00 2001 From: "Rob Swindell (on Windows 11)" <rob@synchro.net> Date: Sun, 14 Jan 2024 20:10:15 -0800 Subject: [PATCH] Fix the recently-added NODE_USER @-code Since "NODE*" is a match for a node number status (ugh), and this comparison happened before the comparison for "NODE_USER", we'd never hit that condition. Thought I tested this before original commit, but I guess I did not. Oops. --- src/sbbs3/atcodes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sbbs3/atcodes.cpp b/src/sbbs3/atcodes.cpp index d73e2ed223..ffe93da808 100644 --- a/src/sbbs3/atcodes.cpp +++ b/src/sbbs3/atcodes.cpp @@ -938,6 +938,9 @@ const char* sbbs_t::atcode(const char* sp, char* str, size_t maxlen, int* pmode, /* LASTCALL */ + if(strcmp(sp, "NODE_USER") == 0) + return thisnode.misc&NODE_ANON ? text[UNKNOWN_USER] : useron.alias; + if(!strncmp(sp,"NODE",4)) { i=atoi(sp+4); if(i && i<=cfg.sys_nodes) { @@ -957,9 +960,6 @@ const char* sbbs_t::atcode(const char* sp, char* str, size_t maxlen, int* pmode, if(!strcmp(sp,"USER") || !strcmp(sp,"ALIAS") || !strcmp(sp,"NAME")) return(useron.alias); - if(strcmp(sp, "NODE_USER") == 0) - return thisnode.misc&NODE_ANON ? text[UNKNOWN_USER] : useron.alias; - if(!strcmp(sp,"FIRST")) { safe_snprintf(str,maxlen,"%s",useron.alias); tp=strchr(str,' '); -- GitLab