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

Add "Native" option for QWKnet call-out cmd-lines

This really shouldn't be necessary to toggle (at least now) on Windows, since we treat all off-line executions as "native", but for *nix, it could make a big difference if trying to invoke a native program or shell script for a QWKnet call-out and it would either fail due to no DOS support or try to executing using Linux-DOSEMU (unless the command's program name was in the global "native program list" configured in SCFG->External Programs).
parent 47e60472
Pipeline #3011 passed with stage
in 9 minutes and 48 seconds
......@@ -3010,10 +3010,13 @@ void event_thread(void* arg)
sbbs->lprintf(LOG_INFO,"Call-out: %s",sbbs->cfg.qhub[i]->id);
int ex_mode = EX_OFFLINE|EX_SH; /* sh for Unix perl scripts */
if(sbbs->cfg.qhub[i]->misc & QHUB_NATIVE)
ex_mode |= EX_NATIVE;
int result = sbbs->external(
,EX_OFFLINE|EX_SH); /* sh for Unix perl scripts */
sbbs->lprintf(result ? LOG_ERR : LOG_INFO, "Call-out to: %s returned %d", sbbs->cfg.qhub[i]->id, result);
......@@ -3185,7 +3188,7 @@ void event_thread(void* arg)
sbbs->lprintf(LOG_INFO,"Running %s%stimed event: %s"
,(ex_mode&EX_NATIVE) ? "native ":""
,(ex_mode&EX_NATIVE) ? "native ":"16-bit DOS "
,(ex_mode&EX_BG) ? "background ":""
......@@ -432,6 +432,7 @@ typedef enum { /* Values for xtrn_t.event */
#define QHUB_NOHEADERS (1<<16) /* Don't include HEADERS.DAT */
#define QHUB_NOVOTING (1<<17) /* Don't include VOTING.DAT */
#define QHUB_UTF8 (1<<18) /* Include UTF-8 characters */
#define QHUB_NATIVE (1<<19) /* Native call-out script */
/* Bits in */
#define CHAT_ECHO (1<<0) /* Multinode chat echo */
......@@ -833,6 +833,7 @@ void qhub_edit(int num)
sprintf(opt[i++],"%-27.27s%s","Pack Command Line",cfg.qhub[num]->pack);
sprintf(opt[i++],"%-27.27s%s","Unpack Command Line",cfg.qhub[num]->unpack);
sprintf(opt[i++],"%-27.27s%s","Call-out Command Line",cfg.qhub[num]->call);
sprintf(opt[i++],"%-27.27s%s","Native Call-out Command",cfg.qhub[num]->misc&QHUB_NATIVE ? "Yes":"No");
if(cfg.qhub[num]->node == NODE_ANY)
SAFECOPY(str, "Any");
......@@ -876,6 +877,9 @@ void qhub_edit(int num)
"The `Call-out Command Line` is executed when your system attempts a packet\n"
"exchange with the QWKnet hub (e.g. executes a script).\n"
"Toggle `Native Call-out Command` to `Yes` if your Call-out Command-line\n"
"is invoking a native (not a 16-bit DOS) program or script.\n"
"`Kludge Lines` (e.g. @TZ, @VIA, @MSGID, @REPLY) provide information not\n"
"available in standard QWK message headers, but are superfluous when the\n"
"HEADERS.DAT file is supported and used.\n"
......@@ -971,6 +975,10 @@ void qhub_edit(int num)
case __COUNTER__:
case __COUNTER__:
if(cfg.qhub[num]->node == NODE_ANY)
SAFECOPY(str, "Any");
Supports Markdown
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