• Synchronet API Documentation?

    From Jagossel@VERT/DISCREAL to All on Sun May 5 19:21:53 2019
    Would anyone have a link to some sort of API or SDK documentation? I have an idea for a project in Synchronet for an ad bot. I think it might be possible to do it in JavaScript.

    Thank you in advance!

    -jag
    Code it, Script it, Automate it!

    ---
    þ Synchronet þ -- You've arrived! Disconnected Reality BBS -- discreal.ddns.net
  • From echicken@VERT/ECBBS to Jagossel on Sun May 5 19:52:55 2019
    Re: Synchronet API Documentation?
    By: Jagossel to All on Sun May 05 2019 19:21:53

    Would anyone have a link to some sort of API or SDK documentation? I have an idea for a project in Synchronet for an ad bot. I think it might be possible to do it in JavaScript.

    http://synchro.net/docs/jsobjs.html

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Nightfox@VERT/DIGDIST to Jagossel on Sun May 5 20:49:33 2019
    Re: Synchronet API Documentation?
    By: Jagossel to All on Sun May 05 2019 07:21 pm

    Would anyone have a link to some sort of API or SDK documentation? I have an idea for a project in Synchronet for an ad bot. I think it might be possible to do it in JavaScript.

    General JavaScript information:
    http://wiki.synchro.net/custom:javascript

    Synchronet JavaScript API documentation: http://www.synchro.net/docs/jsobjs.html

    General Baja information:
    http://wiki.synchro.net/util:baja

    Synchronet Baja API documentation:
    http://synchro.net/docs/baja.html

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Mortifis@VERT/ALLEYCAT to echicken on Sat Jul 13 13:16:05 2019
    Re: Synchronet API Documentation?
    By: Jagossel to All on Sun May 05 2019 19:21:53

    Would anyone have a link to some sort of API or SDK documentation? I have an idea for a project in Synchronet for an ad bot. I think it might be possible to do it in JavaScript.

    http://synchro.net/docs/jsobjs.html

    user.security.restrictions (and exemptions) are integers, so how would one change say restrictions A CD F N P to just CD? I am not sure of the integer representations of exemptions/restrictions.







    When life gets tough, drop a gear and disappear!

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
  • From Digital Man@VERT to Mortifis on Sat Jul 13 14:00:07 2019
    Re: Re: Synchronet API Documentation?
    By: Mortifis to echicken on Sat Jul 13 2019 01:16 pm

    Re: Synchronet API Documentation?
    By: Jagossel to All on Sun May 05 2019 19:21:53

    Would anyone have a link to some sort of API or SDK documentation? I have an idea for a project in Synchronet for an ad bot. I think it might be possible to do it in JavaScript.

    http://synchro.net/docs/jsobjs.html

    user.security.restrictions (and exemptions) are integers, so how would one change say restrictions A CD F N P to just CD? I am not sure of the integer representations of exemptions/restrictions.

    There are lot of examples in exec/*.js, but most of them are setting or clearing a single flag at a time. To set (or clear) multiple flags at a time, use the | bit-wise operator:

    user.security.restrictions = UFLAG_C | UFLAG_D;

    digital man

    Synchronet "Real Fact" #26:
    The Synchronet Web Server was written predominantly by Stephen Hurd (Deuce). Norco, CA WX: 89.7øF, 45.0% humidity, 10 mph ENE wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Sat Jul 13 18:45:38 2019
    Re: Re: Synchronet API Documentation?
    By: Mortifis to echicken on Sat Jul 13 2019 01:16 pm

    Re: Synchronet API Documentation?
    By: Jagossel to All on Sun May 05 2019 19:21:53

    Would anyone have a link to some sort of API or SDK documentation? I have an idea for a project in Synchronet for an ad bot. I think it might be possible to do it in JavaScript.

    http://synchro.net/docs/jsobjs.html

    user.security.restrictions (and exemptions) are integers, so how would one change say restrictions A CD F N P to just CD? I am not sure of the integer representations of exemptions/restrictions.

    There are lot of examples in exec/*.js, but most of them are setting or clearing a single flag at a time. To set (or clear) multiple flags at a time, use the | bit-wise operator:

    user.security.restrictions = UFLAG_C | UFLAG_D;

    digital man

    excellent, thank you!



    When life gets tough, drop a gear and disappear!

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Sat Jul 13 18:49:16 2019
    Re: Re: Synchronet API Documentation?
    By: Mortifis to echicken on Sat Jul 13 2019 01:16 pm

    Re: Synchronet API Documentation?
    By: Jagossel to All on Sun May 05 2019 19:21:53

    Would anyone have a link to some sort of API or SDK documentation? I have an idea for a project in Synchronet for an ad bot. I think it might be possible to do it in JavaScript.

    http://synchro.net/docs/jsobjs.html

    user.security.restrictions (and exemptions) are integers, so how would one change say restrictions A CD F N P to just CD? I am not sure of the integer representations of exemptions/restrictions.

    There are lot of examples in exec/*.js, but most of them are setting or clearing a single flag at a time. To set (or clear) multiple flags at a time, use the | bit-wise operator:

    user.security.restrictions = UFLAG_C | UFLAG_D;

    Is there an easy way to clear all flags for a user account with no restrictions? or a var NEW_UFLAG_SET = ... ?




    When life gets tough, drop a gear and disappear!

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
  • From Digital Man@VERT to Mortifis on Sat Jul 13 16:23:30 2019
    Re: Re: Synchronet API Documentation?
    By: Mortifis to Digital Man on Sat Jul 13 2019 06:49 pm

    Re: Re: Synchronet API Documentation?
    By: Mortifis to echicken on Sat Jul 13 2019 01:16 pm

    Re: Synchronet API Documentation?
    By: Jagossel to All on Sun May 05 2019 19:21:53

    Would anyone have a link to some sort of API or SDK documentation? I have an idea for a project in Synchronet for an ad bot. I think it might be possible to do it in JavaScript.

    http://synchro.net/docs/jsobjs.html

    user.security.restrictions (and exemptions) are integers, so how would one change say restrictions A CD F N P to just CD? I am not sure of the integer representations of exemptions/restrictions.

    There are lot of examples in exec/*.js, but most of them are setting or clearing a single flag at a time. To set (or clear) multiple flags at a time, use the | bit-wise operator:

    user.security.restrictions = UFLAG_C | UFLAG_D;

    Is there an easy way to clear all flags for a user account with no restrictions? or a var NEW_UFLAG_SET = ... ?

    To set an account to have no restrictions,
    user.security.restrictions = 0;

    I'm not sure what you're implying by the NEW_UFLAG_SET var.

    digital man

    Synchronet/BBS Terminology Definition #58:
    R0DENT = Derogatory reference to a young BBS user of the 1990's
    Norco, CA WX: 88.2øF, 44.0% humidity, 16 mph NE wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Sat Jul 13 22:33:38 2019
    Re: Re: Synchronet API Documentation?
    By: Mortifis to Digital Man on Sat Jul 13 2019 06:49 pm

    Re: Re: Synchronet API Documentation?
    By: Mortifis to echicken on Sat Jul 13 2019 01:16 pm

    Re: Synchronet API Documentation?
    By: Jagossel to All on Sun May 05 2019 19:21:53

    Would anyone have a link to some sort of API or SDK documentation? I have an idea for a project in Synchronet for an ad bot. I think it might be possible to do it in JavaScript.

    http://synchro.net/docs/jsobjs.html

    user.security.restrictions (and exemptions) are integers, so how would one change say restrictions A CD F N P to just CD? I am not sure of the integer representations of exemptions/restrictions.

    There are lot of examples in exec/*.js, but most of them are setting or clearing a single flag at a time. To set (or clear) multiple flags at a time, use the | bit-wise operator:

    user.security.restrictions = UFLAG_C | UFLAG_D;

    Is there an easy way to clear all flags for a user account with no restrictions? or a var NEW_UFLAG_SET = ... ?

    To set an account to have no restrictions,
    user.security.restrictions = 0;

    I'm not sure what you're implying by the NEW_UFLAG_SET var.

    digital man

    I am modifying emailval.js ... user.security.restrictions = 0; is good to clear all restrictions, thank you. Is there an easy way to declare a flag set variable (I called it NEW_UFLAG_SET as an example) similar to NEW_UFLAG_SET = "UFLAG_C | UFLAG_D | UFLAG_E ... etc"; ?



    When life gets tough, drop a gear and disappear!

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
  • From echicken@VERT/ECBBS to Mortifis on Sat Jul 13 23:52:28 2019
    Re: Re: Synchronet API Documentation?
    By: Mortifis to Digital Man on Sat Jul 13 2019 22:33:38

    clear all restrictions, thank you. Is there an easy way to declare a flag set variable (I called it NEW_UFLAG_SET as an example) similar to NEW_UFLAG_SET = "UFLAG_C | UFLAG_D | UFLAG_E ... etc"; ?

    If your goal is to do something like:

    user.security.restrictions = NEW_UFLAG_SET;

    then your example is close to what you'd want:

    const NEW_UFLAG_SET = UFLAG_C|UFLAG_D|UFLAG_E; // And so on

    Note that you don't want quotes around the right operand, which would make it a string instead of a bunch of numbers that you're OR-ing together.

    This is kind of a flyswatter approach, which is probably what you want anyway. If you don't want to overwrite the user's entire flag set, it's also possible to add a single flag:

    user.security.restrictions |= UFLAG_C;

    or unset a single flag:

    user.security.restrictions &=~ UFLAG_C;

    Various other things are possible. For some information about these types of operations:

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bit wise_Operators

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Mortifis@VERT/ALLEYCAT to echicken on Sun Jul 14 11:37:09 2019
    Re: Re: Synchronet API Documentation?
    By: Mortifis to Digital Man on Sat Jul 13 2019 22:33:38

    clear all restrictions, thank you. Is there an easy way to declare a flag set variable (I called it NEW_UFLAG_SET as an example) similar to NEW_UFLAG_SET = "UFLAG_C | UFLAG_D | UFLAG_E ... etc"; ?

    If your goal is to do something like:

    user.security.restrictions = NEW_UFLAG_SET;

    then your example is close to what you'd want:

    const NEW_UFLAG_SET = UFLAG_C|UFLAG_D|UFLAG_E; // And so on

    Note that you don't want quotes around the right operand, which would make it a string instead of a bunch of numbers that you're OR-ing together.

    This is kind of a flyswatter approach, which is probably what you want anyway. If you don't want to overwrite the user's entire flag set, it's also possible to add a single flag:

    user.security.restrictions |= UFLAG_C;

    or unset a single flag:

    user.security.restrictions &=~ UFLAG_C;


    Excellent; very helpful, thank you!


    When life gets tough, drop a gear and disappear!

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81