mIRC Homepage
Posted By: HaleyJ Kick script - 01/08/06 09:55 PM
Hi
i am working on a kick script that kicks all nicks, How do i make it that it dosent kick me? Also what improvements can you suggest to the style and format? If the replyer has time to give a short explanation on to how his/hers code works it would be a great help. Thanks
Here is what i have so far.

alias kickall {
var %i = 1
while (%i <= $nick(#,0)) {
kick $chan $nick(#,%i)
inc %i
}
}
Posted By: RusselB Re: Kick script - 01/08/06 10:29 PM
Code:
alias kickall {
  if $me isop $1 {
    var %a = 1
    while %a &lt;= $nick($1,0) {
      if $nick($1,%a) != $me {
        .kick $1 $nick($1,%a)
      }
      inc %a
    }
  }
}
 


Usage: /kickall #channel
#channel is required and must be a channel that your have full ops in.

You can't use $chan in an alias, as it will return $null

Last minute thought, you could also do this from within a right click menu by adding the following
Code:
menu channel,nicklist {
  Kick All : kickall $chan
}

© mIRC Discussion Forums