• exec/tests/user/rtypes.js src/sbbs3/js_msg_area.cpp js_user.cpp userda

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Wednesday, November 18, 2026 19:34:16
    https://gitlab.synchro.net/main/sbbs/-/commit/c8ea10ead86273a37fcf4654
    Modified Files:
    exec/tests/user/rtypes.js src/sbbs3/js_msg_area.cpp js_user.cpp userdat.c userdat.h
    Log Message:
    JS: User.can_send_mail() and msg_area netmail cost properties

    So a script can apply the rules the terminal applies when a user sends
    mail, instead of re-implementing them.

    user_can_send_mail() had no caller and differed from the rules the
    terminal applies in email.cpp and netmail.cpp. It now matches them in
    these respects: sysops are exempt from the e-mail-per-day limit and
    from the "netmail allowed" checks, and it takes a recipient count so
    the limit is checked as today's count plus that count. It is exposed
    as User.can_send_mail(net_type [, to_usernum] [, count]).

    msg_area.inet_netmail_cost and msg_area.fido_netmail_cost expose the
    credit cost per netmail recipient.

    Differences from the terminal that remain: the terminal lets a
    restricted user send validation feedback, decides "to the sysop" by
    the recipient's level, and also requires a configured FidoNet address.

    The allowed path was verified by reading the code against the terminal
    sources, not by execution: the stock test configuration has no real
    user. Built with GCC only.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)