Skip to content
Snippets Groups Projects
Commit 75235365 authored by rswindell's avatar rswindell
Browse files

For the "Scan Msgs" mod, pass the sub-board internal code rater than the

'subnum' as the first command-line argument.
Also, set the current sub-board value used for ARS comparisons before passing
control to a Scan Msgs mod (if there is one), just in case the mod uses ARS
(e.g. bbs.compare_ars) to check for access.
parent 6d93bec1
No related branches found
No related tags found
No related merge requests found
......@@ -377,17 +377,17 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
post_t *post;
smbmsg_t msg;
cursubnum=subnum; /* for ARS */
if(cfg.scanposts_mod[0] && !scanposts_inside) {
char cmdline[256];
scanposts_inside = true;
safe_snprintf(cmdline, sizeof(cmdline), "%s %u %u %s", cfg.scanposts_mod, subnum, mode, find);
safe_snprintf(cmdline, sizeof(cmdline), "%s %s %u %s", cfg.scanposts_mod, cfg.sub[subnum]->code, mode, find);
i=exec_bin(cmdline, &main_csi);
scanposts_inside = false;
return i;
}
find_buf[0]=0;
cursubnum=subnum; /* for ARS */
if(!chk_ar(cfg.sub[subnum]->read_ar,&useron,&client)) {
bprintf(text[CantReadSub]
,cfg.grp[cfg.sub[subnum]->grp]->sname,cfg.sub[subnum]->sname);
......
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