Page 1 of 1

Regex Help

Posted: Sat Apr 02, 2005 3:03 am
by ctn|chrisw
Ive been getting spammers lately spaming those free ipod crap things.

(20:31:15) <Penguin_man`> GET A FREE Flat screen, DS, PSP, Mac Mini, Motorola RAZOR AND MORE! GO TO > http://GrabFreeGear.com/index.php?referral=2098

I am crap with regexes, how would I have it automaticly kill anyone who does a message with "http://grabfreegear.com" in it?

Posted: Sat Apr 02, 2005 3:15 am
by Jason
You would probably not want to just kill them, they would probably come right back. Heres for a 1 hour gline, change the time or reason to whatever you want, but keep the format

/spamfilter add cpnN gline 1h No_Spambots_Allowed http://GrabFreeGear\.com(/(index\.php(\?referral=[0-9]+)?)?)?$

That one will block any message ending with http://GrabFreeGear\.com[/[index.php[?referral=####]]]
[] means that this section may or may not appear.
There may be any number of #s (being a number of course)

As for your origional request (with gline):

/spamfilter add cpnN gline 1h No_Spambots_Allowed http://GrabFreeGear\.com

Your origional request, unaltered:

/spamfilter add cpnN kill - No_Spambots_Allowed http://GrabFreeGear\.com

Posted: Sat Apr 02, 2005 3:16 am
by aquanight
/spamfilter add pcnN kill - Dont_Spam http://grabfreegear\.com

Yes you need the \ :P .

(Ok, scrub the case crap. I thought spamfilter used to be case-sensitive :/ .)

Posted: Sun Apr 03, 2005 4:24 am
by w00t
Not that I know of... at least, not last time I read the docs ;)

Posted: Sun Apr 03, 2005 5:45 am
by aquanight
About 99.9% of other regexp crap I have to deal with (VB, etc) default to case sensitive. So yeah :/ .

Posted: Wed Apr 06, 2005 12:43 pm
by ctn|chrisw
thanks, and yeah the 1 hour gline will probably make sense, but once they spam they dont see to come back anyways if I manually kill them.