Anti Advertise Kicker

By Soulkeeper on Aug 03, 2007

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
}

Comments

Sign in to comment.
xredxthornsx   -  Oct 14, 2008

i just noticed you two opened up a 1 year old snippet.... way to go

 Respond  
xredxthornsx   -  Oct 09, 2008

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

 Respond  
Paul_1337noob   -  Sep 11, 2008
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

 Respond  
AlienDK   -  Sep 11, 2008

Hmm.. Use var instead of set. Also, I don't get the use of %chan. Whats wrong with $chan now? :P But good job :)

 Respond  
xredxthornsx   -  Aug 05, 2007

I like this script gets right to the point. good idea

i\'m still new so nothing i can really say

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.