https://gitlab.synchro.net/main/sbbs/-/commit/5d6cd74955f463cc240986af
Modified Files:
exec/automsg.js avatars.js batchxfer.js chat_sec.js chksetup.js default.js imapservice.js inactive_user_email.js lbshell.js exec/load/bajalib.js birthdays.js dd_lightbar_menu.js exec/load/ircd/core.js exec/load/slyedit_misc.js userdefs.js userprops.js exec/logon.js mailauth.js makeguest.js newuser.js nntpservice.js obv-2.js prextrn.js privatemsg.js privchat.js renegade.js spitfire.js tempxfer.js user_settings.js wwiv.js xtrn_sec.js xtrnmenu.js src/sbbs3/answer.cpp atcodes.cpp bat_xfer.cpp bulkmail.cpp chat.cpp chk_ar.cpp data.cpp email.cpp execfile.cpp ftpsrvr.cpp getmsg.cpp getnode.cpp getstr.cpp js_bbs.cpp js_msgbase.cpp js_user.cpp listfile.cpp logon.cpp logout.cpp mailsrvr.cpp main.cpp netmail.cpp newuser.cpp pack_qwk.cpp postmsg.cpp qwk.cpp qwktomsg.cpp readmail.cpp readmsgs.cpp sbbsdefs.h scansubs.cpp str.cpp un_rep.cpp upgrade_to_v320.c upload.cpp userdat.c viewfile.cpp writemsg.cpp xtrn_sec.cpp web/lib/global_defs.ssjs leftnav_html.ssjs web/lib/nightshade/leftnav_html.ssjs web/root/ecwebv3/pages/003-userlist.xjs web/root/members/userlist.ssjs web/root/msgs/msg.ssjs msgs.ssjs post.ssjs reply.ssjs savemsg.ssjs subs.ssjs webv4/lib/forum.js webv4/pages/000-mail.xjs 001-forum.ssjs webv4/root/api/forum.ssjs xtrn/sdk/xsdkdefs.h
Log Message:
Name the user restriction and exemption flag bits
user.rest and user.exempt both index a FLAG('A'..'Z') namespace in which
the same letter means two unrelated things: 'G' is "Edit Defaults" (the
Guest indicator) as a restriction but "Multiple Nodes" as an exemption,
'T' is "Transfers" versus "Time Online", 'L' is "Logon one/day" versus unlimited logons. Of the 23 assigned letters only 'R' (Remove Files)
agrees between the two fields, and several near-misses ('C', 'D', 'L',
'U') are close enough that a wrong-field test still reads plausibly.
A raw "rest & FLAG('G')" therefore says nothing about which meaning is intended, and swapping the two fields is invisible in review:
02792b752c (2025-09-08) did exactly that while introducing
user_is_guest(), shipping a broken "Multiple Nodes" exemption in v3.21e.
Define one name per (field, letter) in sbbsdefs.h - UREST_* and
UEXEMPT_* - and use them at every site that tests or sets the two
fields: 189 in C/C++, 120 in the stock JavaScript. Because the prefix
has to agree with the field it is applied to, a mismatch is now visible
on a single line. The names cover the full legend in
text/menu/restrict.asc and text/menu/exempt.asc, including the two
restrictions ('W' auto-message, 'X' external programs) that only the
JavaScript modules enforce.
Every name expands to the FLAG() value it replaces, so this is a pure substitution with no functional effect. The only other source edits are trailing comments that the names make redundant.
exec/load/userdefs.js gains matching UREST_*/UEXEMPT_* aliases of its
UFLAG_x values. The bare UFLAG_x names remain in use for user.security.flags1-4, the sysop-defined flag sets that have no fixed
meaning, and in the externally maintained modules under xtrn/.
Also flip sbbsdefs.h's include guard to a non-reserved form, and update
the five #ifndef tests in xtrn/sdk/xsdkdefs.h that use that guard to
detect whether sbbsdefs.h has already been included - they suppress redefinition of macros the two headers share, some of which (ANSI,
COLOR, RIP) hold different values in each.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net