PHP Classes

Rules adding

Recommend this page to a friend!

      Flood Assassin  >  All threads  >  Rules adding  >  (Un) Subscribe thread alerts  
Subject:Rules adding
Summary:how to add new rules
Messages:5
Author:Steven
Date:2009-01-20 17:29:02
Update:2009-01-22 06:47:44
 

 


  1. Rules adding   Reply   Report abuse  
Picture of Steven Steven - 2009-01-20 17:29:02
Hi,

I've been trying your flood assassin and the idea looks nice but the current dummy rules are pretty useless on its own (doesn't even match those annoying sex spam as spam).

Have been looking at the code and think I understand it fairly but I think would be nice for your users to write a little explanation on how to add rules (or if you are bored even an little admin page for it ;) ).

Thanks in advance!

Best regards,

  2. Re: Rules adding   Reply   Report abuse  
Picture of Benjamin Falk Benjamin Falk - 2009-01-21 09:09:35 - In reply to message 1 from Steven
Hello :)

Well I thought the tool is for webdeveloper ... but you're right, I didn't added a quite good tutorial to add rules... I'll write one, but now just for you :D

I'm sorry for my worse english right now :)

rule_id
Leave this blank (or set it to NULL)
rule_content
Regular expression for content of message
rule_contentcount
If higher or lower than 0 each expression which got found get counted.
For example you have the expression „[l]“, contentcount „1“ and the content „Hello world“ you get the spamresul of at least 3 („l“ is 2 times in text)
rule_name
Regular expression for the name of message
rule_mail
Regular expression for mail address of message
rule_ip
A fix IP address
rule_modifier
For better usage of the regular expressions
rule_contentlevel
How many points if rule_content matches with content (0 = default value)
rule_namelevel
Same as rule_contentlevel (0 = default value)
rule_maillevel
Same as rule_contentlevel and rule_namelevel (0 = defaultvalue)
rule_iplevel
Same as rule_contentlevel, rule_namelevel and rule_ip (0 = defaultvalue)
rule_description
Name the rule

  3. Re: Rules adding   Reply   Report abuse  
Picture of Steven Steven - 2009-01-21 12:52:50 - In reply to message 2 from Benjamin Falk
thanks.. that is pretty much how I figured it, just needed to be sure it is actually just the pattern of regex your filling out there.
just need to refresh a bit on reg expressions but there is google ;)

On a side note I don't think the db design of the rules is at its most efficient state but will do just fine for now :)

best regards,

  4. Re: Rules adding   Reply   Report abuse  
Picture of Benjamin Falk Benjamin Falk - 2009-01-21 13:56:23 - In reply to message 3 from Steven
Hello :)
For filtering just sex-comments, you can add a rule just like
rule_content = sex
and the modifier
rule_modifier = i
and for each count
rule_contentlevel = 1.5

and you're right... the design is not the best... but I keep going :) maybe there is a static php-file or something like that.

  5. Re: Rules adding   Reply   Report abuse  
Picture of Steven Steven - 2009-01-22 06:47:44 - In reply to message 4 from Benjamin Falk
hehe
I just added the word 'sex' as content and no modifier and put it directly on 3. There is not mentioning about sex on my blog ;)

but thanks anyway.

 
For more information send a message to info at phpclasses dot org.