Chances are they'll keep on coming back after being kicked.
I believe regex will work best for detecting a URL with one line, but if you don't know regex, you can do it with $wildtok and a loop like this:
on @*:text:*:#:{
var %b 1, %c *www.* *http://* *.com* *.net* *.tk* *.us* *.co* *.gov* *.org*
while $gettok(%c,%b,32) {
if $wildtok($1-,$v1,0,32) {
ban -ku30 # $nick 2 You've been kicked for posting a link.
}
inc %b
}
}
This will ban them for 30 seconds and kick the offender.
Your approach of using one text event per routine is rather repetitive, and the remote size will get a lot bigger than you think when you decide to add more over time.
I tried to modify the script to add 'msg $chan DON'T CLICK THAT LINK' however it gets posted 4 times. Any suggestions