Auto Ban on Join

By DJ Zacharia on Oct 17, 2007

Well this is as basic as it gets. I have a small channel with only 4 users, Though i have the channel set to secret, occassionally people who shouldn't be in my channel would join.

So I wrote this up quickly.

It allows you to enter your channel's users nicks, and it will allow them to join. If a nick that is not on your list joins, well, they will be automatically kicked and ban.

!!!This is only usefull if your channels users maintain their nicks, and if there are only a few users!!!!

other than that enjoy

REPLACE:

YOURCHAN : #YOUR.CHANNEL'S.NAME

NICK : WITH YOUR CHANNEL USER'S NICK (ALLOWED TO ENTER CHANNEL)
NICK1 : WITH ANOTHER CHANNEL USER'S NICK (ALLOWED TO ENTER CHANNEL)
NICK2 : WITH YOUR CHANNEL USER'S NICK (ALLOWED TO ENTER CHANNEL)
NICK3 : WITH YOUR CHANNEL USER'S NICK (ALLOWED TO ENTER CHANNEL)
NICK4 : WITH YOUR CHANNEL USER'S NICK (ALLOWED TO ENTER CHANNEL)
KICK.MESSAGE.HERE : MESSAGE YOU WANT THE PEOPLE YOU K+B TO SEE WHEN YOU K+B THEM.

( ARENT NEEDED IN THE SCRIPT JUST FILL IN THE NEEDED INFO WITHOUT THEM)

on *:join:#*YOURCHAN*: {
  if ($me isop $chan) {
    if ($nick == *NICK*) || ($nick == *NICK1*) || ($nick == *NICK2*) || ($nick == *NICK3*) || ($nick == *NICK4*) {
      halt    
    }
    kick #*YOURCHAN* $nick *KICK.MESSAGE.HERE* {
      ban #*YOURCHAN* $nick {
      }
    }
  }
}

Comments

Sign in to comment.
Jethro   -  Mar 26, 2010

pyth0n, your script is redundant. The /ban command along with the -k switch will do both banning and kicking. There's no reason for you to add a /kick command after it. I think mountaindew may have made a little mistake some two years ago. The script should have been as such:

on @*:join:#: {
  if (!$istok(nick1 nick2 nick3 nick4,$nick,32)) {
    ban -k $chan $nick 2 msg here
  }
}

this will ban the type 2 address, which is the host, and exclude those nicks from the $istok.

 Respond  
pyth0n   -  Mar 26, 2010

mountaindew, your script doesn't work

this worked for me...

on @*:JOIN:#:{
  if (!$istok(nick1 nick2 nick3 nick4,$nick,32)) {
    ban -k $chan $address($nick,2)
    kick $chan $nick msg here
  }
}
 Respond  
guest598594   -  Oct 17, 2007

*ban -k $chan $address($nick,2) Kick msg Here

 Respond  
guest598594   -  Oct 17, 2007
on @*:join:#yourchan:{
  if (!$istok(nick1 nick2 nick3 nick4,32)) {
    ban -k $address($nick,2) *Kick msg here*
  }
}
 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.