this is a Advertising warning and kick then ban..So what this does is warn reg users not to advertise web sites in Ur room. If they keep it up they will be kicked then banned. Load in a new remote. I also added a action event too ..
on !@*:text:*:#:{
if ($nick(#,$nick,vr) && $regex($1-,/http:(//)?|www\.+|(?:[\Wa-z0-9]+\.)+\b[a-z]{3}\b/i)) {
inc $+(%,webspam,.,$chan,.,$address($nick,2))
$iif($($+(%,webspam,.,$chan,.,$address($nick,2)),2) < 3,.notice $nick Please Do NOT Post Link's In This Channel Or You Will Be Removed. $+($chr(3),4,$chr(91),$chr(32),Warning,$chr(32),$chr(35),$($+(%,webspam,.,$chan,.,$address($nick,2)),2),$chr(32),$chr(93)),ban -ku600 # $nick 2 You Were Warned Two Times Not To Post Links.)
$iif($($+(%,webspam,.,$chan,.,$address($nick,2)),2) = 3,unset $+(%,webspam,.,$chan,.,$address($nick,2)))
}
}
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Advertising warning/kick/ban
echo 12 -a A Script0rs Inc. Production
echo -a 14,1(14,1¯15,1¯0,1¯0,1º $+($chr(171),$chr(164),$chr(88),$chr(167),$chr(199),$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187)) º0,1¯15,1¯14,1¯) $+ $chr(153)
}
on !@*:action:*:#:{
if ($nick(#,$nick,vr) && $regex($1-,/http:(//)?|www\.+|(?:[\Wa-z0-9]+\.)+\b[a-z]{3}\b/i)) {
inc $+(%,webspam,.,$chan,.,$address($nick,2))
$iif($($+(%,webspam,.,$chan,.,$address($nick,2)),2) < 3,.notice $nick Please Do NOT Post Link's In This Channel Or You Will Be Removed. $+($chr(3),4,$chr(91),$chr(32),Warning,$chr(32),$chr(35),$($+(%,webspam,.,$chan,.,$address($nick,2)),2),$chr(32),$chr(93)),ban -ku600 # $nick 2 You Were Warned Two Times Not To Post Links.)
$iif($($+(%,webspam,.,$chan,.,$address($nick,2)),2) = 3,unset $+(%,webspam,.,$chan,.,$address($nick,2)))
}
}
MR-MFz wrote:
how about if i want to kick straight without warning and also protect voice,halfop and ops..
on @*:text:*:#:nourl $1-
on @*:action:*:#:nourl $1-
on @*:notice:*:#:nourl $1-
alias -l nourl {
var %d com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk
var %l /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %d $+ )\b/iS
if ($nick isreg #) && ($regex($1-,%l)) { ban -ku600 # $nick 2 Don't post any link! }
}
I will recommend regex's positive lookup:
on @$*:text:/((?<=\43)\S+\b)/iS:#:
Napa's can be altered using \S+ , but that will result in triggering ###### -Edit, unless a \b is added at the end. And we want to use \S to match non-space or special characters in case some channel names are not just words.
How would I go about, doing this. But having an allowed link exception. So that any link that is in that list (for that specific channel) is accepted in that channel. I was thinking of something along the lines of a $read(). But not sure how I would go about checking for that exact base link. If it is in a string of text.
ex: Check out this awesome site www.awesomesite.com
Have the bot check if awesomesite is accepted, and if it isn't then it does the ban. I could use a variable to add a person to an accept link from for 30 seconds or however long I wish. but going about the accepted link I can't figure out.