• Question about logon event

    From mlong@VERT/INREALM to Digital Man@VERT on Sunday, October 18, 2020 12:24:41
    I'm wanting to modify bullshit so that it can show only new bulletins on logon, but show all bulletins when accessed from the external menu.

    My first though was adding a cmd line argument that would override the ini setting. The issue is that when you choose logon event under the external program, you can't specify any different cmd line arguments. So I either have to have 2 external program entries (with different cmd line options), or disable the logon event under the external program and instead use the global logon event entry in scfg.

    So my question is can you think of a better way to do this? Is there a way for an external program to determine it is running under the logon event? Or is there some way to specify different cmd line arguments for external program events? Maybe a new % command line specifier?

    ---
    ■ Synchronet ■ Inner Realm BBS - Charlotte, NC - innerrealmbbs.us
  • From echicken@VERT/ECBBS to mlong on Sunday, October 18, 2020 15:01:38
    Re: Question about logon event
    By: mlong to Digital Man@VERT on Sun Oct 18 2020 12:24:41

    So my question is can you think of a better way to do this? Is there a way for
    an external program to determine it is running under the logon event? Or is

    Possibly like:

    load('nodedefs.js');
    if (bbs.node_action&NODE_LOGN) {
    // User is logging on
    } else {
    // User is logged on
    }

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From Digital Man@VERT to mlong on Sunday, October 18, 2020 12:34:07
    Re: Question about logon event
    By: mlong to Digital Man@VERT on Sun Oct 18 2020 12:24 pm

    I'm wanting to modify bullshit so that it can show only new bulletins on logon, but show all bulletins when accessed from the external menu.

    My first though was adding a cmd line argument that would override the ini setting. The issue is that when you choose logon event under the external program, you can't specify any different cmd line arguments. So I either have to have 2 external program entries (with different cmd line options), or disable the logon event under the external program and instead use the global logon event entry in scfg.

    So my question is can you think of a better way to do this? Is there a way for an external program to determine it is running under the logon event?

    You could compare bbs.node_action to see if its value is NODE_LOGN, that would indicate the current node is still logging-on.

    Or
    is there some way to specify different cmd line arguments for external program events? Maybe a new % command line specifier?

    I think the bbs.node_action check would be the cleanest solution and require no change to sbbs.

    digital man

    Sling Blade quote #13:
    Karl: He lives inside of his own heart. That's an awful big place to live in. Norco, CA WX: 82.5°F, 34.0% humidity, 2 mph NW wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to echicken on Sunday, October 18, 2020 12:36:04
    Re: Question about logon event
    By: echicken to mlong on Sun Oct 18 2020 03:01 pm

    Re: Question about logon event
    By: mlong to Digital Man@VERT on Sun Oct 18 2020 12:24:41

    So my question is can you think of a better way to do this? Is there a way for
    an external program to determine it is running under the logon event? Or is

    Possibly like:

    load('nodedefs.js');
    if (bbs.node_action&NODE_LOGN) {

    Exactly, but bbs.node_action isn't a bit field, so check for equality instead.

    digital man

    Sling Blade quote #23:
    Karl: I reckon I'm gonna have to get used to looking at pretty people.
    Norco, CA WX: 83.7°F, 32.0% humidity, 0 mph NW wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From mlong@VERT/INREALM to Digital Man on Sunday, October 18, 2020 21:04:31
    Thanks to you both. I submitted a merge request, as I think it would be a useful feature for others to have

    ---
    ■ Synchronet ■ Inner Realm BBS - Charlotte, NC - innerrealmbbs.us