• Poul-Henning Kamp's avatar
    Almost complete reimplementation of the internals of bans. · 52ef5676
    Poul-Henning Kamp authored
    -spersistent changed the requirements a fair bit, and amongst other
    things introduced a ban timestamp as a unique identifier of a ban,
    and the need to save and reinstate a ban.
    
    The way this was implemented somewhat less than elegant, but we had
    little choice due to the way regexps work, and amongst other horrors
    it involved too much parsing and quoting of bans as text strings.
    
    Since then we have switched to PCRE, which compiles regexps to
    a bytestream which can be saved offline, and this paved the way
    for this rewrite.
    
    Instead of a datastructure with a list of tests to be carried out,
    build a byte-string which encodes the same information, along with
    additional information (the uncompiled regexp) to allow the ban to
    be reconstructed for display in ban.list.
    
    Include the ban timestamp as the first 8 bytes of the ban specification,
    to eliminate obj->ban_t, saving 8 bytes per object.
    
    Additional polishing to be expected.
    52ef5676
Makefile.am 2.86 KB