Kicks when someone posts a link to a website.
any help would be appreciated :)
BTW, this is my first useful script ;p
on $*:TEXT:/(www\56|\57\57\56|\72\57\57|\43[a-zA-Z]www.*.com | www.*.org | www.*.net | www.*.tv | www.*.co.uk | www.*.biz)/iS:*: {
if ($nick isop $chan) { halt }
msg $chan $nick has been kicked due to advertisement {
.kick $chan $nick you have been kicked due to advertisement, channel notified. {
}
}
}
If you read the comments at http://www.hawkee.com/snippet/5792/, you'll see where zak based this script from. It's perfectly ok he took it from a source and changed it trying to perfect the code itself.
At least he should have the courtesy to say where I obtain it from. People shall never boast themselves and be pretentious to claim something that they've never done. It's the ethical principle that counts.
based on ur other 2 snippets posted, http://www.hawkee.com/snippet/5855/ and http://www.hawkee.com/snippet/5570/, i find it quite hard to believe that u made this yourself
zak123 didn't make the script. That script was by me and I posted it in a comment reply awhile back. He must have seen it and then he grabbed the code and posted it as his "own snippet." He changed it around.
However, that code is a little buggy. Here is my updated version if interested:
on @*:TEXT:*:#: {
if ($nick !isop #) { var %x = /(http:\/\/\w+|www\.\w+)/i, %y = /(\x23{2}\w+)/i, %z = /(\x23\w+)/i
if ($regex($1-,%x)) { kick # $nick You've been kicked due to URL spam. }
if (!$regex($1-,%y)) { kick # $iif($regex($1-,%z),$nick You've been kicked for channel spam.) }
}
}
The . silences the command so there is no echo in the status window. It is not a text command.
Anyways, check this out. Same script jut written ... correctly?
on @$:TEXT:/(www\56|\57\57\56|\72\57\57|\43[a-zA-Z]www..com | www..org | www..net | www..tv | www..co.uk | www..biz)/iS::{
if ($nick !isop $chan) {
msg $chan $nick has been kicked due to advertisement
.kick $chan $nick you have been kicked due to advertisement, channel notified.
}
}
Late response incoming..
zak123, if you didn't create the script, or contribute a certain amount to it, then you've got to give credit to the person; if you don't have the exact link to the comment, then at least mention the person's name. :/
I meant to respond to: Not only does it kick for url link, it also kicks for channel spam...because of the \43[a-zA-Z]
Deja vu...That script looks like the one I posted before...
You got bracket misplaced, unneeded stuff, and here is the edit:
on $*:TEXT:/(www\56|\57\57\56|\72\57\57|\43[a-zA-Z]|.com|.net|.tv|.co.uk|.biz|.info|.org)/iS:*: {
if ($nick !isop $chan) { kick $chan $nick you have been kicked due to advertisement, channel notified. }
}
P.S. Not only does it kick for url link, it also kicks for channel spam...because of the \43[a-zA-Z]