Auto part for bots

By A_A on Aug 18, 2007

this is just a simple bit of code that will automatically part a channel when there are less than 5 users in it

simply put it in remotes section and it should be good to go
where it says ($chan != #A_A) u can replace #A_A with your own channel so it doesn't part your channel

on *:JOIN:#: {
  if ($nick == $me) && ($chan != #A_A) {
    .timer 1 5 _usercount $chan
  }
}
on *:PART:#: {
  if ($nick(#,0) < 5) && ($chan != #A_A) {
    part $chan User count less than 5
  }
}
alias _usercount {
  var %users $nick($1,0)
  if (%users < 5) {
    part $1 User count less than 5
  }
}

Comments

Sign in to comment.
irchainscriptz   -  May 05, 2011

Well the point is really he's made a snippet that works! and that some people like. so nicely done.

 Respond  
meluygas   -  May 03, 2011

es facil de usar .. donde dice A_A <-- pones tu canal osea de donde no se tiene q salir ..cuando entre en algun canal con menos de 5 usuarios sale automaticamente ... especial para el mantenimiento de los bots , saludos desde argentina A_A

 Respond  
meluygas   -  May 03, 2011

gracias funciona a la perfeccion :)

 Respond  
guest598594   -  Aug 22, 2007

sorry bout all the posting, but also, you didnt take on quit into considertion

 Respond  
guest598594   -  Aug 22, 2007

i give it a 1/10, i see no use of it what so ever

 Respond  
guest598594   -  Aug 20, 2007

i dont get the point of this...

 Respond  
Ghost-lit Warder   -  Aug 18, 2007

You could make the channel easier to set by using # $+ %chan and making an alias to set the channel.

alias setchan {
set %chan $?=\"Enter your channel name.\"
}

 Respond  
Anti   -  Aug 18, 2007

What\'s your server A_A??!

 Respond  
A_A   -  Aug 18, 2007

because then you cant set any channels for it to stay in when users fall below 5

 Respond  
T7Davey   -  Aug 18, 2007

Why not just edit it to $chan?

 Respond  
A_A   -  Aug 18, 2007

yeh good idea lol

 Respond  
Godzilla   -  Aug 18, 2007

add this to description that, replace your channel with theirs, or else it won\'t wrk.
($chan != #A_A) {

 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.