mIRC Home    About    Download    Register    News    Help

Print Thread
Kick script #154879 01/08/06 09:55 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
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
}
}


Newbie
Re: Kick script #154880 01/08/06 10:29 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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
}


Last edited by RusselB; 01/08/06 10:33 PM.