Page 1 of 1
Help with regex
Posted: Tue Apr 10, 2007 5:20 pm
by Albatoor
Hi all,
I'm trying to do some spamfilter with regex but it's so difficult for me
I want to allow the !adduser command, but with only 2 options, like
!adduser 1 2, if not have 2 options, command don't show
Thanx
Posted: Tue Apr 10, 2007 7:02 pm
by Jobe
Code: Select all
/spamfilter add c block - Invalid_format ^!adduser [^ ]+ [^ ]+$
Should work in theory.
Posted: Tue Apr 10, 2007 8:07 pm
by Albatoor
With your, spam is detect only when i have the 2 command, i want the contrary

Posted: Tue Apr 10, 2007 8:27 pm
by Albatoor
^!adduser[[:space:]][:sigraph:]$
^!adduser \S$
Didn't work, why ?

Posted: Wed Apr 11, 2007 9:05 am
by Jobe
Ooops my bad. lol
I dont know then. Sorry
Posted: Wed Apr 11, 2007 10:31 am
by Albatoor
^!adduser [^ ]+ $
^!adduser [^ ]+$ or ^!adduser \S+$
It's ok with this 2 regex, First blok !adduser xxx [space]
and second, !adduser xxx
Now, can you help me about setup badword on xxx ?
Thanx

Posted: Wed Apr 11, 2007 7:43 pm
by Jason
Badwords don't need to use regular expressions. They can be normal glob matching.
Posted: Wed Apr 11, 2007 9:20 pm
by Albatoor
hum ok, and can I use regex on badword ? Exemple I need to block the word starting by shit when it's at the end of the sentences ...
I have try : shit.*+$ but doesnt work
Any idea ?
Thanx again
Posted: Thu Apr 12, 2007 1:14 pm
by SpaceDoG
Albatoor you don't need a spamfilter for badwords. Just force all channels/users to be +G and add your badwords to the badwords list.