This sounds like a good idea to me. I think it might be better (required) if there were a 'name' given in the filter command which corresponds to the name in the on FILTER event. The events could allow wildcards to match multiple names (like socket events do). There could also be a separate event for filter done (if this is even necessary). Sometimes parameters would need to be passed to the event, so a 'mark' command like sockmark could be used instead of global variables.

/filtermark NAME $nick $chan $etc
/filter -ff NAME infile outfile search

on *:FILTER:NAME:{
;The result should be in $1- like other events
echo -a $fname result: $1-
echo -a Filtermarks: $fmark(NAME,1-)
}

on*:FILTERDONE:NAME*:{
echo -a Finished Filtering $fname
;Filtermarks are destroyed in the FILTERDONE event
echo -a Filtermarks: $fmark(NAME,1-)
}

-genius_at_work

Last edited by genius_at_work; 10/02/06 02:52 PM.