Need help again !!!

These are old archives. They are kept for historic purposes only.
Post Reply
Annihilator90
Posts: 30
Joined: Sat Jun 02, 2007 1:46 pm

Need help again !!!

Post 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 !
seraphim
Posts: 36
Joined: Tue Apr 03, 2007 11:10 am

Post by seraphim »

/spamfilter add cpnNqt gline 0 Network_Spam irc\.[^ ]+\.(com|org|info|eu)

The last extensions you can edit as you want.
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post 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
Jason
Posts: 570
Joined: Mon Jun 14, 2004 5:09 pm

Post 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.)
Why the hell can't my signature be empty?
"Your message contains too few characters."
Annihilator90
Posts: 30
Joined: Sat Jun 02, 2007 1:46 pm

Post by Annihilator90 »

Thank you all... :D

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.
Jason
Posts: 570
Joined: Mon Jun 14, 2004 5:09 pm

Post by Jason »

Ah. My filter can't do that, as it only handles valid URLs.
Why the hell can't my signature be empty?
"Your message contains too few characters."
Annihilator90
Posts: 30
Joined: Sat Jun 02, 2007 1:46 pm

Post 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?
Jason
Posts: 570
Joined: Mon Jun 14, 2004 5:09 pm

Post by Jason »

<Jason> So, Mr.Eric, that's what you're thinking?

Banned for all eternity
Why the hell can't my signature be empty?
"Your message contains too few characters."
Annihilator90
Posts: 30
Joined: Sat Jun 02, 2007 1:46 pm

Re: Need help again !!!

Post 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?
Post Reply