View Single Post
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 05-29-2011 , 14:18   Re: URL Chat Block
Reply With Quote #5

Quote:
Originally Posted by Leonardo View Post
can this plugin block links which not contains "www." and/or "http(s)://" ? also can it detect link like "some . awesome . website . cc" ?
it's a very hard work to detect url in chat messages... so may it be just a simple url blocker
It does that, it detects most of the common parts in the url, like the .com/.cc/.co.
Quote:
Originally Posted by PpZ | Iconoclast View Post
Do admins have immunity? It would be great if this stopped regular pubs from posting URLs, but as an admin I should be able to post them if desired.
Yes, admins do have immunity
Quote:
Originally Posted by Peace-Maker View Post
You should use a regular expression instead of just checking for some toplevel domains.

Maybe this suffices.
Code:
(?<http>(http:[\/][\/]|www.)([a-z]|[A-Z]|[0-9]|[\/.]|[~])*)
I think the way I'm doing it is easier since most of the regexes don't detect all or just are not compatible with sourcemod; this would be the easiest and the most effective way
minimoney1 is offline