Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Neglect of duty does not cease, by repetition, to be neglect of duty. -- Napoleon


dovenet / Synchronet Baja / Baja argument help

SubjectAuthor
* Baja argument helpDesotoFireflite
`* Baja argument helpDigital Man
 `* Baja argument helpDesotoFireflite
  `* Baja argument helpDigital Man
   `- Baja argument helpDesotoFireflite

1
Baja argument help

<62095230.31.dove-syncbaja@valhalla.synchro.net>

 copy mid

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

 copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: desotofireflite@VERT/VALHALLA (DesotoFireflite)
To: All
Subject: Baja argument help
Message-ID: <62095230.31.dove-syncbaja@valhalla.synchro.net>
Date: Sun, 13 Feb 2022 06:47:12 -0500
X-Comment-To: All
Path: rocksolidbbs.com!not-for-mail
Organization: Valhalla Home Services
Newsgroups: DOVE-Net.Synchronet_Baja
X-FTN-PID: Synchronet 3.19c-Win32 master/5f2881f28 Feb 1 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220213111724-0800 41e0
WhenExported: 20220213165751-0800 41e0
ExportedFrom: VERT bajaprog 4418
WhenImported: 20220213134712-0500 412c
WhenExported: 20220213141715-0500 412c
ExportedFrom: VALHALLA dove-syncbaja 31
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: DesotoFireflite - Sun, 13 Feb 2022 11:47 UTC

I have a login baja module I use to show users a local message base sub called new if a new message is present since the last time they logged in, and if there is nothing new, it does nothing. This works fine, and have been using it for years:

!include sbbsdefs.inc
!include file_io.inc
!include dir_attr.inc

SETSTR "LOCAL"
MSG_SET_GROUP
SETSTR "NEWS"
MSG_SET_AREA
MSG_NEW_SCAN_SUB

Now, I want to improve on this since this script won't show a guest anything or a new user anything, so I improved it. Now it works as intended for guests and new users, and takes them directly to the new message base where they can read the news, or exit themselves by hitting enter.

But the way I have it, it also takes the other users to the news message base even if there are no new messages, so I'm sure I have my logic screwed up. It's acting like it's not getting to the secont part. Below is the new file, can someone let me know where I went wrong. Thanks in advance.

!include sbbsdefs.inc
!include file_io.inc
!include dir_attr.inc

compare_ars LASTON EQUALS 0 OR REST G
if_true
# If New User or Guest, go to Local News Message Base and Read News...
SETSTR "LOCAL"
MSG_SET_GROUP
SETSTR "NEWS"
MSG_SET_AREA
MSG_READ
if_false
# All other users, go to Local message Base, check for new messages In News,
# and show New Messages and if no New Messages exist, do nothing, and exit.
SETSTR "LOCAL"
MSG_SET_GROUP
SETSTR "NEWS"
MSG_SET_AREA
MSG_NEW_SCAN_SUB
end_if

SysOp: C.G. Learn, AKA: DesotoFireflite
Valhalla Home Services! - (Synchronet) - bbs.valhallabbs.com
Valhalla II! - (GAP) - bbs.valhallabbs.com:24
Valhalla III! - (RemoteAccess) - bbs.valhallabbs.com:5023
Valhalla IIII! - (Dungeons & Dragons BBS) - bbs.valhallabbs.com:26
Valhalla Home Services Web! - http://bbs.valhallabbs.com
A Gamers Paradise - Over 150 Registered Online Game Doors!
Home Of Odin's Maze Game Server!

--- Don't eat the yellow snow!
■ Synchronet ■ Valhalla Home Services ■ USA ■ http://valhalla.synchro.net

Baja argument help

<620965F5.4419.bajaprog@vert.synchro.net>

 copy mid

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

 copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: digital.man@VERT (Digital Man)
To: DesotoFireflite
Subject: Baja argument help
Message-ID: <620965F5.4419.bajaprog@vert.synchro.net>
Date: Sun, 13 Feb 2022 05:11:33 -0800
X-Comment-To: DesotoFireflite
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Baja
In-Reply-To: <62095230.31.dove-syncbaja@valhalla.synchro.net>
References: <62095230.31.dove-syncbaja@valhalla.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/7dc07918a Feb 12 2022 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20220213121133-0800 41e0
WhenExported: 20220213165751-0800 41e0
ExportedFrom: VERT bajaprog 4419
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Sun, 13 Feb 2022 13:11 UTC

Re: Baja argument help
By: DesotoFireflite to All on Sun Feb 13 2022 01:47 pm

> But the way I have it, it also takes the other users to the news message
> base even if there are no new messages, so I'm sure I have my logic screwed
> up. It's acting like it's not getting to the secont part. Below is the new
> file, can someone let me know where I went wrong. Thanks in advance.
>
> !include sbbsdefs.inc
> !include file_io.inc
> !include dir_attr.inc
>
> compare_ars LASTON EQUALS 0 OR REST G
> if_true
> # If New User or Guest, go to Local News Message Base and Read News...
> SETSTR "LOCAL"
> MSG_SET_GROUP
> SETSTR "NEWS"
> MSG_SET_AREA
> MSG_READ
> if_false
> # All other users, go to Local message Base, check for new messages In News,
> # and show New Messages and if no New Messages exist, do nothing, and exit.
> SETSTR "LOCAL"
> MSG_SET_GROUP
> SETSTR "NEWS"
> MSG_SET_AREA
> MSG_NEW_SCAN_SUB
> end_if

Replace that "if_false" with "else".
--
digital man (rob)

Breaking Bad quote #41:
Academy hire you right out of the womb? You guys get younger every year!
Norco, CA WX: 84.1°F, 9.0% humidity, 6 mph ENE wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Baja argument help

<62097B6D.33.dove-syncbaja@valhalla.synchro.net>

 copy mid

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

 copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: desotofireflite@VERT/VALHALLA (DesotoFireflite)
To: Digital Man
Subject: Baja argument help
Message-ID: <62097B6D.33.dove-syncbaja@valhalla.synchro.net>
Date: Sun, 13 Feb 2022 09:43:09 -0500
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Valhalla Home Services
Newsgroups: DOVE-Net.Synchronet_Baja
In-Reply-To: <620965F5.4419.bajaprog@vert.synchro.net>
References: <620965F5.4419.bajaprog@vert.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/5f2881f28 Feb 1 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220213141723-0800 41e0
WhenExported: 20220213165751-0800 41e0
ExportedFrom: VERT bajaprog 4420
WhenImported: 20220213164309-0500 412c
WhenExported: 20220213171716-0500 412c
ExportedFrom: VALHALLA dove-syncbaja 33
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: DesotoFireflite - Sun, 13 Feb 2022 14:43 UTC

Re: Baja argument help
By: Digital Man to DesotoFireflite on Sun Feb 13 2022 12:11 pm

DM> Re: Baja argument help
DM> By: DesotoFireflite to All on Sun Feb 13 2022 01:47 pm

>> But the way I have it, it also takes the other users to the news
>> message base even if there are no new messages, so I'm sure I have my
>> logic screwed up. It's acting like it's not getting to the secont
>> part. Below is the new file, can someone let me know where I went
>> wrong. Thanks in advance.

>> !include sbbsdefs.inc
>> !include file_io.inc
>> !include dir_attr.inc

>> compare_ars LASTON EQUALS 0 OR REST G
>> if_true
>> # If New User or Guest, go to Local News Message Base and Read News...
>> SETSTR "LOCAL"
>> MSG_SET_GROUP
>> SETSTR "NEWS"
>> MSG_SET_AREA
>> MSG_READ
>> if_false
>> # All other users, go to Local message Base, check for new messages In
>> News, # and show New Messages and if no New Messages exist, do
>> nothing, and exit. SETSTR "LOCAL"
>> MSG_SET_GROUP
>> SETSTR "NEWS"
>> MSG_SET_AREA
>> MSG_NEW_SCAN_SUB
>> end_if

DM> Replace that "if_false" with "else".

Still not working for the regular users, takes them right to the message base. It's like it's not seeing the second part, and giving everyone the first part.
see below, I changed it as you suggested.

!include sbbsdefs.inc
!include file_io.inc
!include dir_attr.inc

compare_ars LASTON EQUALS 0 OR REST G
if_true
# If New User or Guest, go to Local Message Base and Read News...
SETSTR "LOCAL"
MSG_SET_GROUP
SETSTR "NEWS"
MSG_SET_AREA
MSG_READ
else
# All other users, go to Local message Base, check for new messages In News, # and show New Messages and if no New Messages exist, do nothing, and exit.
SETSTR "LOCAL"
MSG_SET_GROUP
SETSTR "NEWS"
MSG_SET_AREA
MSG_NEW_SCAN_SUB
end_if

I can't understand it, I've worked with Baja before, and I thought I undersood it. I'm figuring with a new user, the last on would be 0(zero), and the Guest would be a restriction of "G", hence "compare_ars LASTON EQUALS 0 OR REST G", so as a regular user with no restrictions, and laston field populated with a date, it should be false, and go to else, the second half, but it's acting like it never sees the second half with regular users, but treats them like a new user or guest. I also tried "compare_ars LASTON=0 OR REST G" and got the same results. My logic must be flawed. It may be the LASTON causing the issue, but I don't know another way of determining a new user with ars or any other method.

SysOp: C.G. Learn, AKA: DesotoFireflite
Valhalla Home Services! - (Synchronet) - bbs.valhallabbs.com
Valhalla II! - (GAP) - bbs.valhallabbs.com:24
Valhalla III! - (RemoteAccess) - bbs.valhallabbs.com:5023
Valhalla IIII! - (Dungeons & Dragons BBS) - bbs.valhallabbs.com:26
Valhalla Home Services Web! - http://bbs.valhallabbs.com
A Gamers Paradise - Over 150 Registered Online Game Doors!
Home Of Odin's Maze Game Server!

--- CAT (n.), Furry keyboard cover.
■ Synchronet ■ Valhalla Home Services ■ USA ■ http://valhalla.synchro.net

Baja argument help

<62098588.4421.bajaprog@vert.synchro.net>

 copy mid

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

 copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: digital.man@VERT (Digital Man)
To: DesotoFireflite
Subject: Baja argument help
Message-ID: <62098588.4421.bajaprog@vert.synchro.net>
Date: Sun, 13 Feb 2022 07:26:16 -0800
X-Comment-To: DesotoFireflite
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Baja
In-Reply-To: <62097B6D.33.dove-syncbaja@valhalla.synchro.net>
References: <62097B6D.33.dove-syncbaja@valhalla.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/7dc07918a Feb 12 2022 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20220213142616-0800 41e0
WhenExported: 20220213165751-0800 41e0
ExportedFrom: VERT bajaprog 4421
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Sun, 13 Feb 2022 15:26 UTC

Re: Baja argument help
By: DesotoFireflite to Digital Man on Sun Feb 13 2022 04:43 pm

> Re: Baja argument help
> By: Digital Man to DesotoFireflite on Sun Feb 13 2022 12:11 pm
>
> DM> Re: Baja argument help
> DM> By: DesotoFireflite to All on Sun Feb 13 2022 01:47 pm
>
> >> But the way I have it, it also takes the other users to the news
> >> message base even if there are no new messages, so I'm sure I have my
> >> logic screwed up. It's acting like it's not getting to the secont
> >> part. Below is the new file, can someone let me know where I went
> >> wrong. Thanks in advance.
>
> >> !include sbbsdefs.inc
> >> !include file_io.inc
> >> !include dir_attr.inc
>
> >> compare_ars LASTON EQUALS 0 OR REST G
> >> if_true
> >> # If New User or Guest, go to Local News Message Base and Read News...
> >> SETSTR "LOCAL"
> >> MSG_SET_GROUP
> >> SETSTR "NEWS"
> >> MSG_SET_AREA
> >> MSG_READ
> >> if_false
> >> # All other users, go to Local message Base, check for new messages In
> >> News, # and show New Messages and if no New Messages exist, do
> >> nothing, and exit. SETSTR "LOCAL"
> >> MSG_SET_GROUP
> >> SETSTR "NEWS"
> >> MSG_SET_AREA
> >> MSG_NEW_SCAN_SUB
> >> end_if
>
> DM> Replace that "if_false" with "else".
>
> Still not working for the regular users, takes them right to the message
> base. It's like it's not seeing the second part, and giving everyone the
> first part. see below, I changed it as you suggested.
>
> !include sbbsdefs.inc
> !include file_io.inc
> !include dir_attr.inc
>
> compare_ars LASTON EQUALS 0 OR REST G
> if_true
> # If New User or Guest, go to Local Message Base and Read News...
> SETSTR "LOCAL"
> MSG_SET_GROUP
> SETSTR "NEWS"
> MSG_SET_AREA
> MSG_READ
> else
> # All other users, go to Local message Base, check for new messages In News,
> # and show New Messages and if no New Messages exist, do nothing, and exit.
> SETSTR "LOCAL"
> MSG_SET_GROUP
> SETSTR "NEWS"
> MSG_SET_AREA
> MSG_NEW_SCAN_SUB
> end_if
>
> I can't understand it, I've worked with Baja before, and I thought I
> undersood it. I'm figuring with a new user, the last on would be 0(zero),
> and the Guest would be a restriction of "G", hence "compare_ars LASTON
> EQUALS 0 OR REST G", so as a regular user with no restrictions, and laston
> field populated with a date, it should be false, and go to else, the second
> half, but it's acting like it never sees the second half with regular users,
> but treats them like a new user or guest. I also tried "compare_ars LASTON=0
> OR REST G" and got the same results. My logic must be flawed. It may be the
> LASTON causing the issue, but I don't know another way of determining a new
> user with ars or any other method.

LASTON is initialized to the current date/time when a new user account is created. "LOGONS" is probably the value you want to be checking. It should be equal to 1 for a user's first logon.

By what you're describing, the second "else" section should *always* be executing and it's the first ("if_true") section that isn't being executed. In that case, fixing the ARS should solve that.
--
digital man (rob)

Synchronet "Real Fact" #30:
The COM I/O routines for Synchronet for DOS were written in ASM by Steve Deppe
Norco, CA WX: 86.6°F, 9.0% humidity, 1 mph SW wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Baja argument help

<620AC0CA.35.dove-syncbaja@valhalla.synchro.net>

 copy mid

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

 copy link   Newsgroups: DOVE-Net.Synchronet_Baja
From: desotofireflite@VERT/VALHALLA (DesotoFireflite)
To: Digital Man
Subject: Baja argument help
Message-ID: <620AC0CA.35.dove-syncbaja@valhalla.synchro.net>
Date: Mon, 14 Feb 2022 08:51:22 -0500
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Valhalla Home Services
Newsgroups: DOVE-Net.Synchronet_Baja
In-Reply-To: <62098588.4421.bajaprog@vert.synchro.net>
References: <62098588.4421.bajaprog@vert.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/5f2881f28 Feb 1 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220214131730-0800 41e0
WhenExported: 20220214165759-0800 41e0
ExportedFrom: VERT bajaprog 4422
WhenImported: 20220214155122-0500 412c
WhenExported: 20220214161720-0500 412c
ExportedFrom: VALHALLA dove-syncbaja 35
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: DesotoFireflite - Mon, 14 Feb 2022 13:51 UTC

Re: Baja argument help
By: Digital Man to DesotoFireflite on Sun Feb 13 2022 02:26 pm

>> I can't understand it, I've worked with Baja before, and I thought I
>> undersood it. I'm figuring with a new user, the last on would be
>> 0(zero), and the Guest would be a restriction of "G", hence
>> "compare_ars LASTON EQUALS 0 OR REST G", so as a regular user with no
>> restrictions, and laston field populated with a date, it should be
>> false, and go to else, the second half, but it's acting like it never
>> sees the second half with regular users, but treats them like a new
>> user or guest. I also tried "compare_ars LASTON=0 OR REST G" and got
>> the same results. My logic must be flawed. It may be the LASTON
>> causing the issue, but I don't know another way of determining a new
>> user with ars or any other method.

DM> LASTON is initialized to the current date/time when a new user account is
DM> created. "LOGONS" is probably the value you want to be checking. It should
DM> be equal to 1 for a user's first logon.

DM> By what you're describing, the second "else" section should *always* be
DM> executing and it's the first ("if_true") section that isn't being
DM> executed. In that case, fixing the ARS should solve that.

"LOGONS" was the key, it's working like I want it to now. I cleaned up the code a bit, so it doesn't look as klunky, see below. Thanks for the help.

!include sbbsdefs.inc
!include file_io.inc
!include dir_attr.inc

SETSTR "LOCAL"
MSG_SET_GROUP
SETSTR "NEWS"
MSG_SET_AREA

compare_ars LOGONS=1 OR REST G
if_true
# If New User or Guest, go to Local Message Base and Read News...
MSG_READ
else
# All other users, go to Local message Base, check for new messages In News, and
# show New Messages and if no New Messages exist, do nothing, and exit.
MSG_NEW_SCAN_SUB
end_if

SysOp: C.G. Learn, AKA: DesotoFireflite
Valhalla Home Services! - (Synchronet) - bbs.valhallabbs.com
Valhalla II! - (GAP) - bbs.valhallabbs.com:24
Valhalla III! - (RemoteAccess) - bbs.valhallabbs.com:5023
Valhalla IIII! - (Dungeons & Dragons BBS) - bbs.valhallabbs.com:26
Valhalla Home Services Web! - http://bbs.valhallabbs.com
A Gamers Paradise - Over 150 Registered Online Game Doors!
Home Of Odin's Maze Game Server!

--- Don't eat the yellow snow!
■ Synchronet ■ Valhalla Home Services ■ USA ■ http://valhalla.synchro.net

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor