Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit d1705535 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Add command-line specifier for user's real name (auto-quoted)

%+ will now expand to the current user's real name, automatically enclosed in quotes if it contains any spaces.
parent e10b39d1
Pipeline #2465 passed with stage
in 14 minutes and 47 seconds
......@@ -1218,6 +1218,10 @@ char* cmdstr(scfg_t* cfg, user_t* user, const char* instr, const char* fpath
case '^': /* Architecture */
strncat(cmd, ARCHITECTURE_DESC, avail);
break;
case '+': /* Real name */
if(user != NULL)
strncat(cmd, quoted_string(user->name, str, sizeof(str)), avail);
break;
default: /* unknown specification */
if(IS_DIGIT(instr[i]) && user!=NULL) {
sprintf(str,"%0*d",instr[i]&0xf,user->number);
......
......@@ -2097,6 +2097,9 @@ char* sbbs_t::cmdstr(const char *instr, const char *fpath, const char *fspec, ch
case '^': /* Architecture */
strncat(cmd, ARCHITECTURE_DESC, avail);
break;
case '+': /* Real name */
strncat(cmd, quoted_string(useron.name, str, sizeof(str)), avail);
break;
default: /* unknown specification */
if(IS_DIGIT(instr[i])) {
sprintf(str,"%0*d",instr[i]&0xf,useron.number);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment