• user.compare_ars() vs. bbs.compare_ars()

    From Nightfox@VERT/DIGDIST to Digital Man on Wed Apr 20 10:05:34 2022
    Hi DM,

    The JS documentation (jsobjs.html) says the user object is an instance of the User class representing the current user online. I've used user.compare_ars() in some of my JS scripts, as it sounded like it would apply to the current user running the script. Yesterday I just noticed the documentation for user.compare_ars() seems to have been updated, and now it says "Note: For the current user o fthe terminal server, use bbs.compare_ars() instead." I'm a little unclear on what exactly "the current user of the terminal server" means, and how that is different from the "current user online", as it says for the user object?

    The documentation for bbs.compare_ars() says it verifies "the current user online" meets the Access Requirements String. It says the user object is also supposed to be the current user online, correct?

    Nightfox

    ---
    Synchronet Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Thu Apr 21 18:57:32 2022
    Re: user.compare_ars() vs. bbs.compare_ars()
    By: Nightfox to Digital Man on Wed Apr 20 2022 10:05 am

    Hi DM,

    The JS documentation (jsobjs.html) says the user object is an instance of the User class representing the current user online. I've used user.compare_ars() in some of my JS scripts, as it sounded like it would apply to the current user running the script. Yesterday I just noticed the documentation for user.compare_ars() seems to have been updated, and now it says "Note: For the current user o fthe terminal server, use bbs.compare_ars() instead." I'm a little unclear on what exactly "the current user of the terminal server" means, and how that is different from the "current user online", as it says for the user object?

    bbs.compare_ars() can take the current terminal server session into account (e.g. terminal capabilties, temp-sysop capabilities), where as user.compare_ars() cannot.

    The documentation for bbs.compare_ars() says it verifies "the current user online" meets the Access Requirements String. It says the user object is also supposed to be the current user online, correct?

    Correct. But the User.compare_ars() method is not identical to the bbs.compare_ars() method, so if your interested in the current terminal server user, it's best to use bbs.compare_ars() instead.
    --
    digital man (rob)

    Breaking Bad quote #45:
    Tough love, all right? Here goes: You 2 suck at peddling meth. period. - Saul Norco, CA WX: 62.0F, 66.0% humidity, 8 mph S wind, 0.00 inches rain/24hrs
    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Thu Apr 21 19:13:03 2022
    Re: user.compare_ars() vs. bbs.compare_ars()
    By: Digital Man to Nightfox on Thu Apr 21 2022 06:57 pm

    bbs.compare_ars() can take the current terminal server session into account (e.g. terminal capabilties, temp-sysop capabilities), where as user.compare_ars() cannot.

    Correct. But the User.compare_ars() method is not identical to the bbs.compare_ars() method, so if your interested in the current terminal server user, it's best to use bbs.compare_ars() instead. --

    I see, thanks.

    Nightfox

    ---
    Synchronet Digital Distortion: digitaldistortionbbs.com