Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Marriage is the only adventure open to the cowardly. -- Voltaire


computers / alt.bbs.mystic / Reading the optional fields in MPL

SubjectAuthor
o Reading the optional fields in MPLKim Ahmad

1
Reading the optional fields in MPL

<fd430e61-c3d0-473b-9f0a-d304a714307fn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1423&group=alt.bbs.mystic#1423

  copy link   Newsgroups: alt.bbs.mystic
X-Received: by 2002:a05:620a:4053:b0:6b5:df8f:3573 with SMTP id i19-20020a05620a405300b006b5df8f3573mr14013509qko.578.1658859936984;
Tue, 26 Jul 2022 11:25:36 -0700 (PDT)
X-Received: by 2002:a05:620a:1ed:b0:6b5:51ef:a01b with SMTP id
x13-20020a05620a01ed00b006b551efa01bmr14262035qkn.672.1658859936824; Tue, 26
Jul 2022 11:25:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.bbs.mystic
Date: Tue, 26 Jul 2022 11:25:36 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=142.188.90.201; posting-account=0VNqWAoAAAAVyoSyqBLd3xf6koa4KpbX
NNTP-Posting-Host: 142.188.90.201
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fd430e61-c3d0-473b-9f0a-d304a714307fn@googlegroups.com>
Subject: Reading the optional fields in MPL
From: irfon.ah...@gmail.com (Kim Ahmad)
Injection-Date: Tue, 26 Jul 2022 18:25:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2678
 by: Kim Ahmad - Tue, 26 Jul 2022 18:25 UTC

I'm attempting to read the optional user fields from an MPL script, but while I have it "working", the way I'm doing it is exceedingly kludgey and there are still issues. It was suggested on Reddit that I might be running into a bug. I wonder if someone can enlighten me.

So, paring the script down to just the relevant bit, I expected to be able to use something like this:

Uses User
While GetUser(CurrentUser) Do Begin
Writeln(UserOpts[1])
CurrentUser:= CurrentUser+1
End

In order to display a list of the 2nd optional field for all users. However, no matter what index I put into UserOpts[1], I get fairly muddled results.. UserOpts[7] gives me the 2nd user field with the first five characters cut off. Eventually I wound up using this:

Writeln(copy(striplow(UserOpts[0]),2,length(striplow(UserOpts[0]))-1))

The reason I went with that is that polling UserOpts[0] reliably included the entire second optional field but with a bunch of garbage ahead of it, and that was my kludgey way of working around that.

The continuing issues, though: If someone edits their entry for the optional field to something shorter, the data past the end remains. So if that field contained abcdef and I changed it to xyz, then ran the script, for that user it would become xyzdef. If I open users.dat in a hex editor and zero out the offending characters it fixes it, but this is clearly not how I'm supposed to be doing any of this. :)

Is there another way I should be indexing into the UserOpts array? Or is there a bug in how the script is retrieving the data? Any ideas?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor