Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

One of the worst of my many faults is that I'm too critical of myself.


dovenet / Synchronet Javascript / user.compare_ars() vs. bbs.compare_ars()

SubjectAuthor
* user.compare_ars() vs. bbs.compare_ars()Nightfox
`* user.compare_ars() vs. bbs.compare_ars()Digital Man
 `- user.compare_ars() vs. bbs.compare_ars()Nightfox

1
user.compare_ars() vs. bbs.compare_ars()

<62603D5E.3627.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=775&group=DOVE-Net.Synchronet_Javascript#775

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: user.compare_ars() vs. bbs.compare_ars()
Message-ID: <62603D5E.3627.dove_sync_js@digitaldistortionbbs.com>
Date: Wed, 20 Apr 2022 03:05:34 -0700
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.19c-Win32 master/1080ab0d8 Apr 15 2022 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20220420102915-0700 c1e0
WhenExported: 20220420115764-0700 c1e0
ExportedFrom: VERT sync-js 3693
WhenImported: 20220420100534-0700 c1e0
WhenExported: 20220420102913-0700 c1e0
ExportedFrom: DIGDIST dove_sync_js 3627
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Wed, 20 Apr 2022 10:05 UTC

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

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

<62620B8C.3694.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=776&group=DOVE-Net.Synchronet_Javascript#776

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Nightfox
Subject: user.compare_ars() vs. bbs.compare_ars()
Message-ID: <62620B8C.3694.sync-js@vert.synchro.net>
Date: Thu, 21 Apr 2022 11:57:32 -0700
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <62603D5E.3627.dove_sync_js@digitaldistortionbbs.com>
References: <62603D5E.3627.dove_sync_js@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.19c-Win32 master/f4b595c0a Apr 16 2022 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20220421185732-0700 c1e0
WhenExported: 20220421235759-0700 c1e0
ExportedFrom: VERT sync-js 3694
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Thu, 21 Apr 2022 18:57 UTC

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.0°F, 66.0% humidity, 8 mph S wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

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

<62620F2F.3630.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=777&group=DOVE-Net.Synchronet_Javascript#777

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: user.compare_ars() vs. bbs.compare_ars()
Message-ID: <62620F2F.3630.dove_sync_js@digitaldistortionbbs.com>
Date: Thu, 21 Apr 2022 12:13:03 -0700
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <62620B8C.3694.sync-js@vert.synchro.net>
References: <62620B8C.3694.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/1080ab0d8 Apr 15 2022 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20220421193054-0700 c1e0
WhenExported: 20220421235759-0700 c1e0
ExportedFrom: VERT sync-js 3695
WhenImported: 20220421191303-0700 c1e0
WhenExported: 20220421193047-0700 c1e0
ExportedFrom: DIGDIST dove_sync_js 3630
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Thu, 21 Apr 2022 19:13 UTC

Re: user.compare_ars() vs. bbs.compare_ars()
By: Digital Man to Nightfox on Thu Apr 21 2022 06:57 pm

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

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

I see, thanks.

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor