https://gitlab.synchro.net/main/sbbs/-/commit/7b1055606f3e241c2b21bcd3
Modified Files:
src/sbbs3/chat.cpp js_bbs.cpp un_rep.cpp userdat.c userdat.h writemsg.cpp
Log Message:
One rule for the E and S restrictions on every way of writing to a user
The E-mail (E) and E-mail Sysop (S) restrictions were applied by five
more copies of the rule besides the e-mail functions: e-mail in an
uploaded REP packet, telegrams from the chat menu and from
bbs.telegram(), and forwarding a message to a user. Those copies still
had the rule's first form: S meant user #1 only, E everyone else. The
e-mail function itself was changed in 2023 to treat any account at
sysop level as the sysop, and the copies were left behind.
All five now call user_can_send_mail(), so they mean what e-mail means:
- E: the user may not write to users who are not sysops.
- S: the user may not write to a sysop, whichever account that is.
What changes for a restricted user:
- A co-sysop counts as the sysop for telegrams, forwards and REP
e-mail: with E they can be written to, with S they cannot (it was
the other way round for everyone but user #1).
- E no longer refuses every e-mail in a REP packet before looking at
the recipient: e-mail to a sysop is accepted, as from the terminal.
Netmail in the packet is governed by the netmail restriction (M)
alone, as from the terminal.
- A sysop uploading a REP packet is not held to the e-mail-per-day
limit, as from the terminal.
- Forwarding to a user reports a restriction before the per-day limit.
The exception that lets a restricted new user send a first message to
the validation user is for e-mail only (the terminal and a REP packet).
A new flag, CANSEND_NOT_FEEDBACK, turns it off for telegrams and
forwards.
Nothing changes for a user with neither restriction.
Built with GCC only. None of these paths can be run without a terminal
session, so they were read and compiled; the function's own rules are
covered by exec/tests/user/can_send_mail.
Co-Authored-By: Claude Fable 5.2 <
noreply@anthropic.com>