• src/sbbs3/trash.c trash.h

    From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Sunday, December 17, 2023 18:14:00
    https://gitlab.synchro.net/main/sbbs/-/commit/a73a8212c7f77398e5386dd3
    Added Files:
    src/sbbs3/trash.c trash.h
    Modified Files:
    src/sbbs3/dupefind.vcxproj filelist.vcxproj findstr.c findstr.h src/sbbs3/gtkchat/objects.mk src/sbbs3/js_system.c mailsrvr.c makeuser.vcxproj objects.mk qwk.cpp sbbs.h sbbs.vcxproj sbbsecho.c sbbsecho.vcxproj src/sbbs3/scfg/objects.mk scfg.vcxproj src/sbbs3/scfglib.h scfglib1.c src/sbbs3/uedit/objects.mk src/sbbs3/umonitor/objects.mk src/sbbs3/upgrade_to_v319.vcxproj upgrade_to_v320.vcxproj userdat.c websrvr.c
    Log Message:
    Add support for metadata in *.can (filter) files

    I wanted a couple of features for filters (e.g. blocked IP addreses):
    - expiration date, optionally (only block for a limited time)
    - display details of reason for filter in log messages (at time of block)

    I've been thinking for some time that these files should be converted to .ini, but then it occurred to me that I could do a sort of hybrid where the metadata was key/value pairs tab-delimited from the search-pattern (first text on the line). This is backward comaptible, relatively easy to view/edit by hand, and extensible (easy to add/remove metadata fields in the future). So they'll remain as text/*.can files.

    The maximum line length for findstr/trashcan parsed files extended from 255 to 1000 characters.

    Moved all trashcan-related functions from scfglib1.c to (new file) trash.c.

    For the first time, I actually tested a build on WSL *before* committing to Git. So, this *should* pass CI the first time. :-O

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net