Commit 1134b020 authored by rswindell's avatar rswindell

Allow external chat pagers to have their "native" and "use shell" execution

flags set manually in SCFG.
parent 74c61f0f
......@@ -717,8 +717,14 @@ bool sbbs_t::sysop_page(void)
break;
if(i<cfg.total_pages) {
bprintf(text[PagingGuru],cfg.sys_op);
external(cmdstr(cfg.page[i]->cmd,nulstr,nulstr,NULL)
,cfg.page[i]->misc&XTRN_STDIO ? EX_STDIO : 0);
long mode = 0;
if(cfg.page[i]->misc&XTRN_STDIO)
mode |= EX_STDIO;
if(cfg.page[i]->misc&XTRN_NATIVE)
mode|= EX_NATIVE;
if(cfg.page[i]->misc&XTRN_SH)
mode |= EX_SH;
external(cmdstr(cfg.page[i]->cmd,nulstr,nulstr,NULL), mode);
}
else if(cfg.sys_misc&SM_SHRTPAGE) {
bprintf(text[PagingGuru],cfg.sys_op);
......
......@@ -130,6 +130,10 @@ void page_cfg()
sprintf(opt[k++],"%-27.27s%s","Intercept I/O"
,(cfg.page[i]->misc&XTRN_STDIO) ? "Standard"
:cfg.page[i]->misc&XTRN_CONIO ? "Console":"No");
sprintf(opt[k++],"%-27.27s%s","Native Executable"
,cfg.page[i]->misc&XTRN_NATIVE ? "Yes" : "No");
sprintf(opt[k++],"%-27.27s%s","Use Shell to Execute"
,cfg.page[i]->misc&XTRN_SH ? "Yes" : "No");
opt[k][0]=0;
sprintf(str,"Sysop Chat Pager #%d",i+1);
switch(uifc.list(WIN_ACT|WIN_MID|WIN_SAV,0,0,60,&j,0,str,opt)) {
......@@ -196,6 +200,45 @@ void page_cfg()
break;
}
break;
case 3:
k=(cfg.page[i]->misc&XTRN_NATIVE) ? 0:1;
uifc.helpbuf=
"`Native Executable:`\n"
"\n"
"If this online program is a native (e.g. non-DOS) executable,\n"
"set this option to `Yes`.\n"
;
k=uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Native",uifcYesNoOpts);
if(!k && !(cfg.page[i]->misc&XTRN_NATIVE)) {
cfg.page[i]->misc|=XTRN_NATIVE;
uifc.changes=TRUE;
}
else if(k==1 && (cfg.page[i]->misc&XTRN_NATIVE)) {
cfg.page[i]->misc&=~XTRN_NATIVE;
uifc.changes=TRUE;
}
break;
case 4:
k=(cfg.page[i]->misc&XTRN_SH) ? 0:1;
uifc.helpbuf=
"`Use Shell to Execute Command:`\n"
"\n"
"If this command-line requires the system command shell to execute, (Unix\n"
"shell script or DOS batch file), set this option to ~Yes~.\n"
;
k=uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Use Shell",uifcYesNoOpts);
if(!k && !(cfg.page[i]->misc&XTRN_SH)) {
cfg.page[i]->misc|=XTRN_SH;
uifc.changes=TRUE;
}
else if(k==1 && (cfg.page[i]->misc&XTRN_SH)) {
cfg.page[i]->misc&=~XTRN_SH;
uifc.changes=TRUE;
}
break;
}
}
}
......
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