• src/sbbs3/js_system.cpp

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Thu Jul 2 00:55:42 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/657bb4ee6dd07aa16be5b260
    Modified Files:
    src/sbbs3/js_system.cpp
    Log Message:
    Fix system.filter_ip() ignoring a duration argument after the filename

    js_filter_ip()'s argument parser stopped scanning as soon as the filename
    (6th string) was assigned (loop guarded by `fname == NULL`), so a numeric duration passed after the filename -- the order the JSDOCSTR documents, "[protocol, reason, host, ip, username, filename] [duration-in-seconds]" --
    was never read. duration stayed 0, producing a filter entry with no
    expiration (no e=), i.e. a permanent block, when a timed one was requested.

    Scan all arguments for the (optional) numeric duration regardless of
    position, and ignore any extra string arguments (freeing them) rather than overwriting the filename. The documented argument order now works; verified with a fresh build via jsexec (duration after filename now yields e=).

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