• Running mod from sysop menu

    From Andre@1:103/705 to All on Sun Feb 20 09:06:10 2022
    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.

    My knowledge problem:
    When msg_list is called from default.src with Baja, I have no idea how that links up to src/sbbs3.

    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?


    - Andre

    ---
    þ Synchronet þ Radio Mentor BBS - bbs.radiomentor.org
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Andre on Sun Feb 20 12:16:06 2022
    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
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Andre@1:103/705 to Digital Man on Sun Feb 20 14:44:12 2022
    Re: Running mod from sysop menu
    By: Digital Man to Andre on Sun Feb 20 2022 12:16 pm

    execmsg.cpp:
    case CS_MSG_LIST:
    listsub(usrsub[curgrp][cursub[curgrp]], SCAN_INDEX, /* start: */0, /* search: */NULL);

    Ah, that's where I got lost in all my rushing around. It's funny, in all my looking through code yesterday, each time I looked at a file I would think, "Ah, yeah, that makes sense." Then today I got hit like a ton of bricks by the messaging code today and remembered, "Oh, that's right... all the code is in here because BBS is primarily messaging."

    exec_bin() does the "mods" then "exec" search for .js and .bin files, so it should work. --

    I'll retest. Probably pebkac.


    - Andre

    ---
    þ Synchronet þ Radio Mentor BBS - bbs.radiomentor.org
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Andre on Sun Feb 20 15:13:10 2022
    Re: Running mod from sysop menu
    By: Andre to Digital Man on Sun Feb 20 2022 02:44 pm

    Re: Running mod from sysop menu
    By: Digital Man to Andre on Sun Feb 20 2022 12:16 pm

    execmsg.cpp:
    case CS_MSG_LIST:
    listsub(usrsub[curgrp][cursub[curgrp]], SCAN_INDEX, /* start: */0, /* search: */NULL);

    Ah, that's where I got lost in all my rushing around. It's funny, in all my looking through code yesterday, each time I looked at a file I would think, "Ah, yeah, that makes sense." Then today I got hit like a ton of bricks by the messaging code today and remembered, "Oh, that's right... all the code is in here because BBS is primarily messaging."

    Well the exec*.cpp files are for executing the PCMS/Baja instructions from .bin files. "msg_list" is a messaging-related function, so it's in execmsg.cpp.
    --
    digital man (rob)

    Sling Blade quote #17:
    Charles Bushman: A shovel just makes too goddamned much racket.
    Norco, CA WX: 65.4øF, 54.0% humidity, 12 mph SSE wind, 0.00 inches rain/24hrs --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)