Mass modes for nicklist

By astro on Sep 07, 2004

this snippet will allow you to select as many users in a nicklist as you want and get around mIRC's limit of 6 modes (6 nicks). Usage would be mass +q, mass -q etc

;mass modes
alias ma {
  var %m.inc 0,%m.all 1-5,%mnicks = $3-,%b.num,%b.tot
  while ($gettok(%mnicks,%m.inc,32) != $null) {
    var %ban.mask
    if ($2 == +b) {
      %b.num = $gettok(%m.all,1,45) | %b.tot = $gettok(%m.all,2,45)
      while (%b.num <= %b.tot) { var %ban.mask = %ban.mask $address($gettok(%mnicks,%b.num,32),2) | inc %b.num 1 }
    }
    .raw mode $1 $str($2,$gettok($gettok(%mnicks,%m.all,32),o,32)) $iif(%b.nick,%b.nick,$gettok(%mnicks,%m.all,32)) | inc %m.inc 6 | %m.all = %m.inc $+ - $+ $calc(%m.inc + 5)
  }
}

;mass kick
alias ka { var %k.nicks = 0 | while (%k.nicks < $gettok($2,0,32)) { inc %k.nicks 1 | kick $1 $gettok($2,%k.nicks,32) $iif($3,$3-,$me) } }

alias rem.me { return $iif($findtok($1,$me,1,32),$deltok($1,$findtok($1,$me,1,32),32),$1) }

;menu nicklist
menu nicklist {
&Control
  .&Owner Selected (+q):ma $chan +q $rem.me($replace($snicks,$chr(44),$chr(32)))
  .&DeOwner Selected (-q):ma $chan -q $rem.me($replace($snicks,$chr(44),$chr(32)))
  .&Op Selected (+o):ma $chan +o $rem.me($replace($snicks,$chr(44),$chr(32)))
  .&Deop Selected (-o):ma $chan -o $rem.me($replace($snicks,$chr(44),$chr(32)))
  .&Voice Selected (+v):ma $chan +v $replace($snicks,$chr(44),$chr(32))
  .&Devoice Selected (-v):ma $chan -v $replace($snicks,$chr(44),$chr(32))
  .-
  .&Kick Selected:var %tmp = $ka($chan,$rem.me($replace($snicks,$chr(44),$chr(32))))
  .K&ick Selected (Reason):var %tmp $ka($chan,$rem.me($replace($snicks,$chr(44),$chr(32))),$$ok(1,Please enter the reason to kick these users,&Kick,&Cancel,Kick User(s),bye!))
  .-
  .&Ban Selected (+b):ma $chan +b $rem.me($replace($snicks,$chr(44),$chr(32)))
  .&Ban, Kick Selected (+b):ma $chan +b $rem.me($replace($snicks,$chr(44),$chr(32))) | var %tmp = $ka($chan,$rem.me($replace($snicks,$chr(44),$chr(32))))
  .&Ban, Kick Selected (Reason) (+b):ma $chan +b $rem.me($replace($snicks,$chr(44),$chr(32))) | $ka($chan,$rem.me($replace($snicks,$chr(44),$chr(32))),$$ok(1,Please enter the reason to kick and ban these users,&Kick,&Cancel,Kick User(s),Banned!))
}

Comments

Sign in to comment.
GrimStalker   -  Aug 31, 2009

Hey, I do get an' error!! 1 No such channel

when I use (kick Ban with reason)&(kick with reason)

I did change $$ok to $$ka

Any Idea?

 Respond  
XXsplit   -  Apr 30, 2005

ooops... as i was saying... on litlle bug in kick and kick/ban with reason $$ok(1,Please enter.... should be $$ka(1,Please enter ... Nice job ;)

 Respond  
XXsplit   -  Apr 30, 2005

hehe.... nice job astro.... on littll

 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.