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.
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.
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
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.
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
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;
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 = ... ?
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
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"; ?
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;
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,043 |
Nodes: | 15 (0 / 15) |
Uptime: | 41:57:28 |
Calls: | 500,899 |
Calls today: | 2 |
Files: | 109,370 |
D/L today: |
4,736 files (491M bytes) |
Messages: | 304,224 |