mIRC Homepage
Posted By: clutz1572 question on mass kick/bans - 15/05/05 09:16 PM
hello again,

i'm pretty sure i know to the answer to this but, i'll ask anyways.
is it possible to do mass kicks and bans ?
also
how would a multi mode change go? like for instance i want to de-op and voice the opnick.. would it look like this ?: /mode -ooo ... +vvv ...

thanks in advance
Posted By: RusselB Re: question on mass kick/bans - 15/05/05 09:25 PM
Yes it is possible...I'd recommend checking what the value in $modespl is since that will determine the maximum number of modes that can be changed at one time.

For example if $modespl was 12 then you could do
/mode -oooooo +vvvvvv <nick1> <nick2> <nick3 <nick4> <nick5> <nick6>

To determine what the value in $modespl is I recommend using //echo -a $modespl
Posted By: clutz1572 Re: question on mass kick/bans - 15/05/05 10:26 PM
cool, thanks RusselB
Posted By: alhammer Re: question on mass kick/bans - 16/05/05 10:07 PM
You could also do:
Code:
alias massop {
  var %x = $nick($chan,0)
  while (%x) {
    mode # +o $nick($chan,%x)
    dec %x
  }
}
If you wanted to do a kick, you might want something like this to make sure you don't kick yourslef:
Code:
alias masskick {
  var %x = $nick($chan,0)
  while (%x) {
    if $nick($chan,%x) != $me kick # $nick($chan,%x) MASS KICK!  
    dec %x
  }
}
You can use similar code to kick or change modes on all non-ops or vise-versa. smile
Posted By: SladeKraven Re: question on mass kick/bans - 16/05/05 10:45 PM
Might be an idea to check if you're an operator on the channel.

-Andy
Posted By: clutz1572 Re: question on mass kick/bans - 17/05/05 05:50 PM
lol, that kick does sound like much fun! grin

but i more or less had a more controlled idea in mind..
this is the code i'm trying to make work:
Code:
if ($did == 11) {
      var %h = 1, %a
      while $did(1,%h).sel {
        %a = %a $did(1,$v1) 
        inc %h
        if $numtok(%a,32) == $modespl { kick %brum.OPChat.Chan %a | var %a }
      }
      if $numtok(%a,32) { kick %brum.OPChat.Chan %a }
      if ($did($dname,1).sel) { 
        while ($did($dname,1).sel) {
          did -d $dname 1 $did($dname,1).sel
        }
      }
    }
 


as you can see, it's part of some dialog code i'm working on. this works like a normal single kick but i'm lost on making it kick only selected nicks..
© mIRC Discussion Forums