On Fri, 2009-10-09 at 15:34 +0100, Steve Freegard wrote: > Marc Perkel wrote:
> > > It's essentially Perl logical expression syntax, and basic math > > > expression syntax if you want to count: > > > > > > meta NAME rule1 && (rule2a + rule2b + rule2c + rule2d > 2) > > > > When adding rules is it a count of the number of rules or the rule scores? It is never the score. > It's the number of times the rule hit (e.g. 0 or 1 for regular rules; 0 > or more for rules with 'tflags multiple'). Also, meta and eval (sub-)rules may evaluate to non-Boolean values. Both however, generally are actually Boolean. The value of an eval rule is that returned by its function. The value of a meta rule is that of its arithmetic expression. meta BOOL ONE_A + ONE_B > 1 meta ARITH ONE_A + ONE_B BOOL will always be either 0 or 1, while ARITH might be 2, the sum of the sub-rules. While the latter generally is *not* used by SA stock rules, but usually strictly the former, it is something to keep in mind when using them in metas with arithmetic expressions. Marc, may I suggest reading the M::SA::Conf docs for the meta rule definition documentation? guenther -- char *t="\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}