Use This Snippet if you`re looking to warn:kick/ban people who advertise #channels in your channel. If you would like it to warn the person the 1st time then the 2nd time kick/ban the person for 2 mins. Also if you do not want the script to warn/kick/ban any voiced or oped users.
Enjoy it...
on *:TEXT:*#*:#channel: {
if ($nick !isop $chan) {
inc %ad. [ $+ [ $nick ] ]
if (%ad. [ $+ [ $nick ] ] == 1) { notice $nick 0,1Don't advertise in 9#channel 0, you will be banned on your next offense, see 9Game7Surge 0aup rule 3 for details. }
if (%ad. [ $+ [ $nick ] ] == 2) { ban -ku120 $chan $nick 0,1Temp. Ban 2 min for channel advertising, see 09Game7Surge 0aup rule 3 for details. }
if (%ad. [ $+ [ $nick ] ] == 3) { ban -ku600 $chan $nick 0,1Temp. Ban 10 min for channel advertising, see 9Game7Surge 0aup rule 3 for details. | unset %ad. [ $+ [ $nick ] ] }
}
}
if i'm in #chan1 and i say hello #chan1 i'll be ban kicked?!! XD
better to make a code warning operators of the channel like
on *:text:*:#:{
var %x 1
while ($wildtok($1-,#*,%x,32)) var %t %t $iif($v1 != #,$v1),%x %x + 1
if (%t) notice $nick(#,$r(1,$nick(#,0,o)),o) $nick was saying [ $v1 ] may be this can be a spam!
}
this code will send a notice for a random OP
Teen, it means they run it on a particular server and didn't think to change the message.
Anyway.. You might want to make this script work by IP address instead of nickname, as that's harder to change.
Another improvement could be the use of -eu switches on your /inc (see help file for info) because otherwise someone could be banned for spamming a few times over a week or months.