Anti-Advertising

By Foamy on Jan 13, 2006

An anti-advertising script. If the code locates "www" or "http" in a channel it will kick them. Then the next time it k+bans.

on *:connect: {
  unset %first.*
}

on *@:join:#: {
  ; Start Insert
  set %first. $+ $nick On
  .timer 1 900 unset %first. $+ $nick On
  ; End Insert
}

on *@:text:*:#: {
  ; Start Insert
  if ($nick !isop #) {
    if ( [ %first. [ $+ [ $nick ] ] ] != $null) {
      if (www isin $strip($1-)) || (http isin $strip($1-)) {
        ban # $nick 2
        kick # $nick No Advertising Allowed!
      }
      if (join $chr(35) isin $strip($1-)) {
        ban # $nick 2
        kick # $nick No Advertising Allowed!
      }
      if ($0 == 1) && ($left($1,1) == $chr(35)) {
        ban # $nick 2
        kick # $nick No Advertising Allowed!
      }
    }
    unset %first. $+ $nick
  }
  ; End Insert
}

Comments

Sign in to comment.
FiberOPtics   -  Jan 14, 2006

//if (www isin awww) echo -a match

This script is terrible.

 Respond  
Foamy   -  Jan 14, 2006

I haven\'t had anyone say \"Awww\" which would trigger the \"www\" event. but I don\'t think they user would be kicked because they started it with \"A\" and not just \"W\".

 Respond  
KuTsuM   -  Jan 14, 2006

What happens if someone says \"awww\" which seems to be commonly done

 Respond  
Foamy   -  Jan 13, 2006

Well, so also if someone types \"go to http://\" blah blah blah..
@ xDaeMon; Lol. I don\'t really know how to do that, this is really my first time making my own Anti-Advertising. I\'ve had help from others. So this was my first attempt also using $strip.

 Respond  
xDaeMoN   -  Jan 13, 2006

You can reduce a couple lines by using /ban -k, combination of the /ban & /kick command.

/help /ban

Also why not just strip everyting at the beginning of the event by inserting the code below before the first if statement:

tokenize 32 $strip($1-)

So you don\'t have to keep using strip everytime.

/help /tokenize

 Respond  
XpLoiTeR   -  Jan 13, 2006

in fact foamy i dont c the importance of all of that code..i think u should have dont it like that

on :text::# {
if ($nick !isop $chan) {
if (www isin $1-) || (http isin $1-) || (join $chr(35) isin $1-) {
kick # $nick Spamming Not allowed.
}
}
}

i think that will fill the purpose .. much shorter anyway gj

 Respond  
XpLoiTeR   -  Jan 13, 2006

i didnt try it...but seems to be clean

 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.