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

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.
parent 9b1a34b3
No related branches found
No related tags found
No related merge requests found
Pipeline #5267 passed
......@@ -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,' ');
......
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