Well, This script kick anyone who tries to advertise in your channel, but only kicks people who are advertising a channel other than the one you are in. I.e. anyone in #england can say #england, but anything else will be concidered spam. Easy snippet, with three levels of warning
on 1:text:*#*:#:{
set %text $1-
set %chan $chan
set %nick $nick
if (%chan !isin %text) && ($me isop $chan) && ($nick !isop $chan) {
kick %chan %nick Don't Advertise (First Warning)
auser 300 $address(%nick,5)
}
unset %chan
unset %text
unset %nick
}
on 300:text:*#*:#:{
set %text $1-
set %chan $chan
set %nick $nick
if (%chan !isin %text) && ($me isop $chan) && ($nick !isop $chan) {
ban -ku60 %chan %nick Don't Advertise (60 Second Ban)
auser 400 $address(%nick,5)
ruser 300 $address(%nick,5)
}
unset %chan
unset %text
unset %nick
}
on 400:text:*#*:#:{
set %text $1-
set %chan $chan
set %nick $nick
if (%chan !isin %text) && ($me isop $chan) && ($nick !isop $chan) {
ban -k %chan %nick Don't Advertise (Permanent Ban)
ruser 400 $address(%nick,5)
}
unset %chan
unset %text
unset %nick
}
No that is the easy way. useing 1 300 and 400 just makes the script check the users list to see if the person has the level of 1 300 or 400. which is so much easier then making variables because with variables you would have to make a new one each time someone advertises. Which would need a bunch of cross reference checks.
it could use work but this was posted last year so idk it might have been posted many more times with more improvments
i would say that you need to remove the user when they leave the channel
if (%chan !isin %text) && ($me isop $chan) && ($nick !isop $chan) {
kick %chan %nick Don't Advertise (First Warning)
can just be
if ($chan !isin $1-) && ($me isop $chan) && ($nick !isop $chan) {
kick $chan $nick Don't Advertise (First Warning)
no need for the variables
i got a feeling something isnt right with your 3 levels of wanrings
looks like your using
1, 300 and 400, arent they levels of err userpower?
like with a dream bot, 1 is normal user 300 halfop and 400 op
:s that may need looking into
maybe you should set a variable with how many times they have been warned and depending on warnings increase the punishment
maybe add on website advertising aswell