Subj : PCRE in Synchronet? To : Angus Mcleod From : Digital Man Date : Sun Dec 19 2004 01:54 pm Re: PCRE in Synchronet? By: Angus Mcleod to Digital Man on Fri Dec 17 2004 10:11 pm > > > I was hoping that a suitable library had already been included in the > > > code-base. I don't much fancy sticking an entire library in there to > > > silly proggy or two! > > > > What exactly did you want to do? > > I'd only got a vague idea on improving the filtering in various ways: > > * Read the entire twit-list once before starting on the packet, and build > a structure in-memory, rather than re-reading the file repeatedly for > each message. I prefer to optimize where there is a perceived (or profiled) bottleneck in performance. So far, reading the twitlist (per message) hasn't shown to be that. Mainly thanks to the excellent caching in modern OSes I'm sure. > * Support some sort of network-specific or host-specific lists like say > maybe twitlist.vert.cfg for filters applicable to a specific host and/or > twitlist.dove-net.cfg to filter by specific network. Default twitlist.cfg > to apply to all packets. > > * Expand syntax to make filters more useful. I'm thinking allow the > field(s) to be matched to be specified, and the action to be taken to be > specified as well. Currently, a name is checked against From: and To: > and if matched it's dropped: > > Drop: From= To= Newborn > > But also allow (say): > > Drop: Subject= Body= NetJuke > > and perhaps: > > Moveto RELIGION: Subj= Law and Evo0ltion > > And so forth. As you can see, poorly considered at present, and no doubt > worth considerable more thought, but it would obviously be valuable to be > able to use RE's in matching. Most of what you've described above doesn't directly rely on RE's. And, like I said, you do have the .can-style matching specifiers at your disposal currently. I *am* planning on converting twitlist.cfg to a much more extensible .ini format in the future (just like most, if not all, the other application-specific configuration files). Example: [Jokester] Match=to,from Action=delete Expire=Jan-01-2010 .... Something like that. digital man Snapple "Real Fact" #13: Cats have over 100 vocal sounds. .