Re: Running mod from sysop menu
By: Andre to All on Sun Feb 20 2022 09:06 am
Multipart problem as I try to understand Loadable Modules better...
Actual problem:
I am trying to make DDMsgReader list files from the main 'L' option. When I do, it loads personal mail only instead of the sub, which makes me think that either I'm not doing a switch correctly or that Sync isn't passing that switch and is just loading the module without adding the switch. The loadable module in "List Msgs" is "DDReadPersonalMail -startMode=list". I've also tried -chooseAreaFirst and that doesn't seem to change behavior.
I experimented with this just now using my msglist module (e.g. adding/removing the '-p' [preview]) option, and it worked as expected.
My knowledge problem:
When msg_list is called from default.src with Baja, I have no idea how that links up to src/sbbs3.
That call-stack looks like this:
execmsg.cpp:
case CS_MSG_LIST:
listsub(usrsub[curgrp][cursub[curgrp]], SCAN_INDEX, /* start: */0, /* search: */NULL);
readmsgs.cpp:
if((mode&SCAN_INDEX) && cfg.listmsgs_mod[0]) {
char cmdline[256];
safe_snprintf(cmdline, sizeof(cmdline), "%s %s %ld", cfg.listmsgs_mod, cfg.sub[subnum]->code, mode);
return exec_bin(cmdline, &main_csi);
}
My testing confusion:
I'd like to be able to call DDReadPersonalMail.js directly from the terminal server, but I can't figure out how that's done. When I do ";EXEC ?" or whatever (I forget it now that I'm not in the menu), it says that it can't find it in the exec directory. Which is correct, because it's in the mods directory. Can I call a .js module from /mods or only from /exec?
exec_bin() does the "mods" then "exec" search for .js and .bin files, so it should work.
--
digital man (rob)
Rush quote #24:
The more that things change, the more they stay the same
Norco, CA WX: 64.8øF, 49.0% humidity, 6 mph SE wind, 0.00 inches rain/24hrs
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net