• src/sbbs3/maxclients_notify.hppctrl/sbbs.ini docs/v322_new.md src/sbbs

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sat Nov 21 13:56:31 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/80da834f1d0892acd60e9ead
    Added Files:
    src/sbbs3/maxclients_notify.hpp
    Modified Files:
    ctrl/sbbs.ini docs/v322_new.md src/sbbs3/ftpsrvr.cpp mailsrvr.cpp main.cpp sbbs_ini.c src/sbbs3/scfg/scfgindex.h scfgsrvr.c src/sbbs3/services.cpp startup.h websrvr.cpp
    Log Message:
    Servers: optionally notify the sysop when refusing clients at capacity (#1384)

    A server at its client limit refused each new connection with only a
    warning in its log, so a scraper burst could turn visitors away for
    minutes without the sysop hearing of it.

    The new per-server MaxClientsNotify setting ([BBS], [FTP], [Mail],
    [Services] and [Web] in sbbs.ini; "Notify Sysop When Full" in each
    server's SCFG menu; off by default) changes that. The first refused
    connection of an episode is logged once at error level, which reaches error.log, the sysop's error notifications and MQTT. Later refusals
    are only counted, and once 5 minutes pass with none, a summary (how
    many were refused, over what span) is logged as a warning. Each
    refusal's own warning line is unchanged.

    What counts as a refusal: the web, FTP and mail servers reaching
    MaxClients; the terminal server finding no node available; a service
    reaching its MaxClients in services.ini, which only refuses connections
    with the FULL_ACCEPT option (otherwise new connections wait in the
    listen backlog and nothing is refused).

    The episode tracking is shared header-only code, maxclients_notify.hpp.
    The setting is a new last member of STARTUP_COMMON_ELEMENTS, so the size
    of every server's startup struct changes and the Windows sbbsctrl.exe
    must be rebuilt with this change.

    Tested on Linux with isolated web and FTP servers limited to 2 clients:
    with the setting on, six refused connections each produced one error
    line and one error.log entry, and the summary followed 5 minutes after
    the last refusal. With it off, refusals logged no error. SCFG and
    the terminal, mail and services servers were built but not exercised.

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