-
exec/avatars.js
From
rswindell@1:103/705 to
CVS commit on Mon Jan 8 04:37:26 2018
exec avatars.js NONE 1.1
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv18300
Added Files:
avatars.js
Log Message:
Module for dealing with Avatars (import/export/debug), mainly via JSexec
But this may be enhanced for other Avatar related needs (browse/select,
edit etc.).
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Mon Jan 8 22:16:04 2018
exec avatars.js 1.1 1.2
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv13844
Modified Files:
avatars.js
Log Message:
Added support for import/export of shared avatar bin files (libraries of avatars).
The library (from where the user picks stock/shared avatars) is text/avatars/*.bin.
Network-shared avatars .bin files (meeting the requirements) are imported
as <qwk-id>.<filename.bin> in this directory.
The sysop chooses which locally created avatar libraries to share
with the "export=<sub> -f=<filename>".
There's no de-duplication at this time.
Move some functions from avatar_lib.js to avatars.js.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Mon Jan 8 23:19:42 2018
exec avatars.js 1.2 1.3
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv22590
Modified Files:
avatars.js
Log Message:
Confirm the *length* of imported .bin files (must be evenly divisble by
avatar size) before copying to text/avatars.
Use '-file=<filename>', rather than -f.
Export/share an avatar library like this:
jsexec avatars export=syncdata -file=../text/avatars/custom.bin
Export user's avatars like this:
jsexec avatars export=syncdata -users
Import avatars (users and shared libraries), like this:
jsexec avatars import=syncdata
(replace syncdata with the correct code for the syncdata sub)
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Tue Jan 9 17:14:28 2018
exec avatars.js 1.3 1.4
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv13255
Modified Files:
avatars.js
Log Message:
Fixed a couple of typos for hdr.from_net_addr causing the from-net-ID to
be 'undefined'.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Tue Jan 9 19:27:45 2018
exec avatars.js 1.4 1.5
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv26684
Modified Files:
avatars.js
Log Message:
Created avatar_lib is_valid() method and use it verify avatars meet the reuirements (e.g. no chars that'll cause problems, no blink attribute)
before importing or exporting.
Added "verify" command to verify .bin files meet the avatar requirements
(e.g. "jsexec avatars verify -file=/path/to/some.bin")
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Tue Jan 9 20:42:03 2018
exec avatars.js 1.5 1.6
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv1318
Modified Files:
avatars.js
Log Message:
Don't error if there's no .ini file when importing.
Fix typo in import_netuser_list().
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Tue Jan 9 22:51:13 2018
exec avatars.js 1.6 1.7
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv14758
Modified Files:
avatars.js
Log Message:
Fix the regexp in valid_shared_file() (used by "verify" and other commands
to verify an avatar .bin file) - '.' matches any char except line-endings
and 0x0D and 0x0A are valid attribute values in a bin file. Oops.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Wed Jan 10 14:23:20 2018
exec avatars.js 1.7 1.8
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv27550
Modified Files:
avatars.js
Log Message:
Export sauce info in JSON format along with shared avatar (.bin) files
(mainly for human consumption).
Added remove, enable, and disable commands.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Wed Jan 10 21:23:09 2018
exec avatars.js 1.8 1.9
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv12632
Modified Files:
avatars.js
Log Message:
Don't export empty user avatar lists. Oops.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Wed Jan 10 23:23:34 2018
exec avatars.js 1.9 1.10
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv15447
Modified Files:
avatars.js
Log Message:
Fix the export of user avatars (broken in last commit) objects don't have
a length property (normally).
Change the command-line usage: one command per invocation, but multiple
files possible (e.g. with "export" and "verify" commands).
You don't need the '-file' or '-users' arguments anymore.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Thu Jan 11 00:42:59 2018
exec avatars.js 1.10 1.11
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv24696
Modified Files:
avatars.js
Log Message:
[avatars] section in modopts.ini now used for 2 things:
default import/export sub-board (default to 'syncdata')
export_freq (default: 7 days)
The user avatars export frequency is now controlled and
user avatars should not be exported unless they've been
recently created or updated or the configured frequency
has elapsed.
There's currently no export frequency control for
collections (ever time you export a .bin file, it'll be exported to
the msg base)
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 12 17:12:42 2018
exec avatars.js 1.11 1.12
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv28760
Modified Files:
avatars.js
Log Message:
Fix avatar collection import filename:
1. Don't include the parents QWK-ID's in a routed QWKnet address
(e.g. it should import to data/qnet/someid.file.bin, not
data/qnet/vert/someid.file.bin)
2. If the filename (exported from the original board) already includes the
QWK-ID as a prefix, don't add it again to the filename.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 12 22:26:51 2018
exec avatars.js 1.12 1.13
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv32323
Modified Files:
avatars.js
Log Message:
Don't import avatars or avatar collections from twit-listed usernames.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Sat Jan 13 16:19:32 2018
exec avatars.js 1.13 1.14
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv28295
Modified Files:
avatars.js
Log Message:
- New command: "newuser":
Used to easily import an avatar into the [newuser] section of your
modopts.ini file (to be used a default new-user avatar).
Example "jsexec avatars newuser /sbbs/text/avatars/silhouettes.bin"
- Export frequency control of collections:
The date/time of last export (of each file) is now stored in the
data/subs/<msgbase>.ini file, so collections won't be re-exported unless
they've been updated or the configured export frequency has elapsed
(default: 7 days)
- New option: '-share', used with the "export" command:
This option will automatically export any files matching the pattern:
text/avatars/<QWK-ID>.*.bin
<QWK-ID> must match the local system QWK-ID in uppercase.
(the export frequency controls still apply)
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Sat Jan 13 18:45:06 2018
exec avatars.js 1.14 1.15
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv15073
Modified Files:
avatars.js
Log Message:
Allow the avatar-disabled state to propagate the network:
- it'll actually remove the avatar on remote systems
avatar_lib.js
- a change that was part of the "newuser" command (whoops)
- renamed enabled() methdod to is_enabled().
- catch exceptions in Graphic.load()
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Sun Jan 14 20:26:07 2018
exec avatars.js 1.15 1.16
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv19391
Modified Files:
avatars.js
Log Message:
"show" and "draw" commands can now accept filenames (for .bin files) and
will draw/show them to the terminal user, with key presses between.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Mon Jan 15 21:16:10 2018
exec avatars.js 1.16 1.17
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv3859
Modified Files:
avatars.js
Log Message:
Fixed typos in data/qnet/*.avatar.ini comment addition.
Don't export disabled state for avatars that were never exported to begin
with.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Tue Jan 16 20:39:29 2018
exec avatars.js 1.17 1.18
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv15554
Modified Files:
avatars.js
Log Message:
Find the syncdata sub-board internal code automatically
- No need to pass on command or put in modopts.ini (though you still can) Created a new "install" command to make the necessary changes to xtrn.cnf:
- Creates AVATCHOO external program (if not already configured)
- Creates AVAT-IN and AVAT-OUT timed events (if not already configured)
- Updates modopts.ini to enable default new-user avatar and prompt during logon
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Wed Jan 17 14:47:02 2018
exec avatars.js 1.18 1.19
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv26551
Modified Files:
avatars.js
Log Message:
When auto-sharing collections (text/avatars/QWK-ID.*.bin), exclude any Pablodraw backup files (e.g. QWK-ID.001.bin).
Also, just use the filename (not the full path) when storing the export
date in data/subs/<syncdata>.ini
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Thu Jan 18 13:18:17 2018
exec avatars.js 1.19 1.20
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv19674
Modified Files:
avatars.js
Log Message:
Don't export avatars for users that:
- have never posted
- cannot post to networked-message areas
- are QWKnet nodes
- haven't logged in since the avatar was last exported
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Thu Jan 18 18:04:03 2018
exec avatars.js 1.20 1.21
Update of /cvsroot/sbbs/exec
In directory cvs:/home/rswindell/sbbs/exec
Modified Files:
avatars.js
Log Message:
Fixed typo in previous commit (wouldn't export user avatars for anyone)
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 19 00:57:05 2018
exec avatars.js 1.21 1.22
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv27688
Modified Files:
avatars.js
Log Message:
Added a "normalize" command for normalizing a user's avatar or a specific avatar within a .bin file (selected with the -offset argument).
Added "-user" argument used to specify a user name or number to operate
on.
Added "-v" (increase verbosity) argument.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 19 16:55:55 2018
exec avatars.js 1.22 1.23
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv19010
Modified Files:
avatars.js
Log Message:
More detailed output in import_netuser_list().
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 19 16:59:56 2018
exec avatars.js 1.23 1.24
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv19433
Modified Files:
avatars.js
Log Message:
Log an error message if can't open <qwk-id>.avatars.ini (and the file
exists).
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 19 17:04:37 2018
exec avatars.js 1.24 1.25
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv19950
Modified Files:
avatars.js
Log Message:
Yet more verbose debug output in import_netuser_list()
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 19 17:07:59 2018
exec avatars.js 1.25 1.26
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv20274
Modified Files:
avatars.js
Log Message:
Fix bug with "disabled" avatars: use Array.splice() to remove an element,
not array[element] = undefined (thinking of an object)
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 19 20:28:25 2018
exec avatars.js 1.26 1.27
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv8293
Modified Files:
avatars.js
Log Message:
Optimized "import" function: eliminate unnecessary msg index reads.
Added FidoNet support:
- Imported user avatars or collections from FidoNet addresses are stored
in data/fido/<nodeaddr>.*, where <nodeaddr> is the standard hex-encoded
network and node numbers. No changes needed elsewhere.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Sat Jan 20 19:59:16 2018
exec avatars.js 1.28 1.29
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv19112
Modified Files:
avatars.js
Log Message:
* avatar_lib.js can now look up users by BBS name (in data/bbses.ini), an
index between BBS names and (message) network addresses.
This will be useful for instances where we want to display an avatar
but we don't necessarily know a message network address of the user
(e.g. in instant messages, BBS list entries).
* avatars.js can now accept multiple commands per invocation
(e.g. import and export in the same operation).
* avatars.js now creates/updates the data/bbses.ini index file whenever
user avatars are imported (e.g. via SYNCDATA).
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
echicken@1:103/705 to
CVS commit on Tue Jan 23 14:19:50 2018
exec avatars.js 1.29 1.30
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv26366
Modified Files:
avatars.js
Log Message:
bbes
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Wed Jan 24 17:12:17 2018
exec avatars.js 1.30 1.31
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv21589
Modified Files:
avatars.js
Log Message:
Fix 'inactive since' log output, added count command
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Thu Jan 25 02:13:38 2018
exec avatars.js 1.31 1.32
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv19442
Modified Files:
avatars.js
Log Message:
Added timestamp to msg-expored user avatars to defeate dupe checking
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Feb 2 05:01:55 2018
exec avatars.js 1.32 1.33
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv20056
Modified Files:
avatars.js
Log Message:
Fixed typo.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Tue Sep 11 00:28:49 2018
exec avatars.js 1.34 1.35
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv29805
Modified Files:
avatars.js
Log Message:
Fix puke on empty data/user/####.ini file:
!JavaScript avatars.js line 340: TypeError: avatar is null
Added a couple of comments and some helpful log/console output.
--- SBBSecho 3.06-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Mon Jan 21 02:22:52 2019
exec avatars.js 1.35 1.36
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv21808
Modified Files:
avatars.js
Log Message:
Fixed typo: security.restrictions, not security_restrictions!
--- SBBSecho 3.06-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Mon Jun 3 22:03:18 2019
exec avatars.js 1.36 1.37
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv14186
Modified Files:
avatars.js
Log Message:
Add a "sub_default" command-line option so a default avatar can be easily imported, e.g.
jsexec avatars sub_default=/sbbs/text/avatars/silhouettes.bin
--- SBBSecho 3.07-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Sun Aug 18 20:01:59 2019
exec avatars.js 1.38 1.39
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv13770
Modified Files:
avatars.js
Log Message:
Fix issue where Share Avatar Collections imported from FTN were saved as files in data/fido with the node number encoded twice (once in hex and once in decimal):
006702c1.705.VERT.misc.bin
This is a harmless bug, but an unintentional one. It would also result in unexpected filenames in text/avatars:
705.VERT.misc.bin
So... this commit should remove the "705." from these filenames.
--- SBBSecho 3.08-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Thu Dec 31 14:13:47 2020
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Mon Jan 11 19:32:40 2021
https://gitlab.synchro.net/main/sbbs/-/commit/5f088ad2a5d0267cdf0ad3b3
Modified Files:
exec/avatars.js
Log Message:
By default, export MD5 digest of real name associated with an avatarThis enables Avatar displays on real-name-only networks without leakingreal names into the SYNCDATA sub.If the -realnames option is used, the unobscured full real names areexported (as before).If the (new) -aliasonly option is used, even
the MD5 digest of users'real names is left out.
--- SBBSecho 3.12-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Wed Feb 23 13:01:08 2022
https://gitlab.synchro.net/main/sbbs/-/commit/9166b520ca68317216e2b5b9
Modified Files:
exec/avatars.js
Log Message:
Increase white-space tolerance when importing avatars from msgbaseTARDIS (Quarkware BBS, the Ruby BBS), uses just \n for QWK messageline deliniation, but we were expected \r\n terminated lines here.Also, apparently there was trailing white-space on the "json-end"line, so handle that case too.
--- SBBSecho 3.14-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Wed Feb 23 13:27:08 2022
-
From
Rob Swindell (on Debian Linux)@1:103/705 to
Git commit to main/sbbs/master on Tue Dec 3 22:52:43 2024
https://gitlab.synchro.net/main/sbbs/-/commit/b29b8cfc0e7c9b039c0e52a9
Modified Files:
exec/avatars.js
Log Message:
.ini files need to be opened for read/write access when writing/updating
This happened to work before commit d49134e6f7 since iniReadFile()
didn't return false upon any read error, so File.iniSetAllObjects() didn't realize that the read of (any) existing file contents had failed (because the file was open write-only).
This explains why the *.avatars.ini files were pretty much blank as of late
and no networked message posters were having their avatars displayed.
Reported by Codefenix (thank you).
Add a print/log line to tell us how many avatars were parsed, just for extra traceability of this script and any potential failure cause.
--- SBBSecho 3.23-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
Rob Swindell (on Debian Linux)@1:103/705 to
Git commit to main/sbbs/master on Thu Jan 16 00:29:47 2025