Would be best to get rid of your script and have your Gamemasters/admins ban the people who spam, or at least search the message that contains .com, .net, .org, etc and make it return (message won't get sent.) You aren't ever going to make it so they can't link anything in chat, so you might as well do it the best way possible.