Page 1 of 1
Need help again !!!
Posted: Sat Jun 02, 2007 2:28 pm
by Annihilator90
Hi,
Any good regex to stop all those advertisings in my server? The bots will send messages like (for example) , "come to ... irc.something.net "or similar addresses like that. I want to ban all the addresses with any combination.i.e. to ban irc.s0m3th1ng.net and so on as well. Any good regex for that? Thank you !
Posted: Sat Jun 02, 2007 2:39 pm
by seraphim
/spamfilter add cpnNqt gline 0 Network_Spam irc\.[^ ]+\.(com|org|info|eu)
The last extensions you can edit as you want.
Posted: Sat Jun 02, 2007 2:55 pm
by Jobe
since there are many more TLD's that could be used then just .com, .net, .org, .info, .eu, etc... I would suggest replacing that part with a "[^ ]+" too
Posted: Sat Jun 02, 2007 3:52 pm
by Jason
A regular expression matching all valid URLs with protocols http or ftp, as well as any usable portion of said urls:
Code: Select all
((ht|f)tp://)?((([a-z0-9_-]+:[a-z0-9_-]+@)?([a-z0-9_-]+\.)+(A[CDEFGILMNOQRSTUWZ]|ac.uk|AERO|ARPA|B[^CKLPQ\W\d]|BIZ|C[^BEJPQTVW\W\d]|COM|COOP|D[EJKMOZ]|E[CEGRSTU]|EDU|F[IJKMOR]|G[^\W\dCJKOVXZ]|GOV|H[KMNRTU]|I[DELMNOQRST]|INFO|INT|J[EMOP]|JOBS|K[EGHIMNPRWYZ]|L[ABCIKRSTUVY]|M[^\W\dBEFIJ]|MIL|MOBI|MUSEUM|N[ACEFGILOPRTUZ]|NAME|NET|OM|ORG|P[AEFGHKLMNRSTWY]|PRO|QA|R[EOUW]|S[^\W\dFPQSX]|T[^\W\dABEIQSUXY]|TRAVEL|U[AGKMSYZ]|V[ACEGINU]|W[FS]|Y[ETU]|Z[AMW]))|(([0-9]{1,3}\.){3}[0-9]{1,3}))(/[^ /\?]+)*([^ /\?]+)?(\?[^ ]*)?
EDIT: Corrected Escaping (I had it in my config, so the \s needed to be \\s. You may need to change them back, as I believe this is too long to be added as a spamfilter on IRC.)
Posted: Sun Jun 03, 2007 8:02 am
by Annihilator90
Thank you all...
I think it would also block i r c . s o m e t h i n g. n e t and irc. (s)(o)(m)(e)(t)(h)(i)(n)(g).net as well with any alphanumeric combinations too.
Posted: Mon Jun 04, 2007 3:27 pm
by Jason
Ah. My filter can't do that, as it only handles valid URLs.
Posted: Tue Jun 05, 2007 11:28 am
by Annihilator90
So what if i add spamfliter for ^s.*o.*m.*e.*t.*h.*i.*n.*g.* ? <<<< ( my friend's suggestion )
Will it block those ? How does it work?
Posted: Wed Jun 06, 2007 2:42 pm
by Jason
<Jason> So, Mr.Eric, that's what you're thinking?
Banned for all eternity
Re: Need help again !!!
Posted: Tue Dec 04, 2007 2:01 pm
by Annihilator90
So how can i ban those "something" word from messages? It should only match something, s o m e t h i n g, s o m e t h i n g, or anything in between these words like ( , )or | any characters. And funnily i found that some spamfilter also catches
adfksomethingkdfa as well. How can I prevent this from happening?