|
parvez
|
parvez
|
hey can someone tell the codes for Mass Command I only want Mass Op,Voice,devoice,deop,unban thats all! I use this for mass kill,kill,ban alias masskick {
unset %total
set %count.nick 1
set %total $nick(#,0)
:start
inc %count.nick
if (%count.nick > %total) { halt }
if ($nick(#,%count.nick) == $me) { goto start }
else { kick # $nick(#,%count.nick) 12[14[0,4 MASS 14,0]12] | goto start }
}
|
|
|
|
Joined: Dec 2002
Posts: 148
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 148 |
here are 2 different methods for doing it .. i couldnt deside which i liked best ...
massmode {
; * Usage: /massmode +/-ov [#chan]
tokenize 32 $1 $iif($2 ischan, $2, $active)
var %s = $iif($left($1,1) == +,1), %m = $right($1,-1)
var %len = %modespl, %nicklist, %nick
var %ctr = 0, %tot = $iif(%s, $nick($2,0,a,%m), $nick($2,0,%m))
while (%ctr < %tot) {
inc %ctr | var %nick = $iif(%s, $nick($2,%ctr,a,%m), $nick($2,%ctr,%m))
%nicklist = %nicklist %nick
if ($numtok(%nicklist,32) = %len) {
mode $2 $+($iif(%s,+,-),$str(%m,%len)) %nicklist
var %nicklist
}
}
if (%nicklist) { mode $2 $+($iif(%s,+,-),$str(%m,$numtok(%nicklist,32))) %nicklist }
}
massmode2 {
; * Usage: /massmode +/-ov [#chan]
tokenize 32 $1 $iif($2 ischan, $2, $active)
var %s = $iif($left($1,1) == +,1), %m = $right($1,-1)
var %len = $modespl, %nicklist, %nick
var %ctr = 0, %tot = $iif(%s, $nick($2,0,a,%m), $nick($2,0,%m))
while (%ctr < %tot) {
inc %ctr | var %nick = $iif(%s, $nick($2,%ctr,a,%m), $nick($2,%ctr,%m))
var %nicklist = %nicklist %nick
}
var %ctr = 1, %tot = $numtok(%nicklist,32)
while (%ctr <= %tot) {
var %range = $+(%ctr,-,$calc(%ctr * %len)) | inc %ctr %len
mode $2 $+($iif(%s,+,-),$str(%m,%len)) $gettok(%nicklist,%range,32)
}
}
basicly it loops though each person that doesnt match your desired outcome .. so if your doing /massmode +o for example it will loop though $nick(#chan,N,a,o) (all nicks except ops) all non ops in other words but if your doing say -v it loops though $nick(#chan,N,v) (all voices) trather than looping though EVERYONE if they need it or not. (this will help prevent flood offs notice that i use $modespl for %len (the length for each mode command) .. $modespl returns the limit the server alows for mode commands if specified in raw 005, however for some odd reason if u wish to change it u can simply replace $modespl with 6 .. or 4 .. or whatever u wish. the difference between the first one and the 2nd one is that the first one sets the modes as it gets enough nicks to do so, while its still collecting nicks .. the 2nd one simply collects all nicks, then loops though and sets all modes .. it realy doesnt mater which u use. if u have any questions about this code feel free to ask. it should work with any +/-o,v,h,u (not all networks suport +h and +u) Cobra^
|
|
|
|
Joined: Dec 2002
Posts: 148
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 148 |
an after thought .. if u use that code to mass -o and it deops yourself before it gets though the list u could get some errors .. also iit doesnt automaticly check to see if your +o before it trys seting modes .. but those are simple enough things to edit in i asume u can take care of it, if not let me know ...
Cobra^
|
|
|
|
Joined: Nov 2003
Posts: 2,321
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,321 |
Small typo: %modespl should be $modespl in /massmode
|
|
|
|
Joined: Dec 2002
Posts: 148
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 148 |
yep, good eye  thanks Cobra^
|
|
|
|
Nicon
|
Nicon
|
in alias
ma { %k.num = 0 %k.total = $nick(#,0) %k.kick = 0 :loop inc %k.num 1 if ( %k.num > %k.total ) { goto done } elseif ( $nick(#,%k.num) == $me ) { goto loop } else { inc %k.kick 1 echo %Channel 15[14 $+ $time(hh:nn) $+ 15] 14 - address.. 14 $+ $nick(#,%k.num) 15(14 $+ $address($nick(#,%k.num),1) $+ 15) goto loop } :done unset %k.* }
mv { %k.num = 0 %k.total = $nick(#,0) %k.kick = 0 :loop inc %k.num 1 if ( %k.num > %k.total ) { goto done } elseif ( $nick(#,%k.num) == $me ) { goto loop } else { inc %k.kick 1 mode # +v $nick(#,%k.num) goto loop } :done unset %k.* } mdv { %k.num = 0 %k.total = $nick(#,0) %k.kick = 0 :loop inc %k.num 1 if ( %k.num > %k.total ) { goto done } elseif ( $nick(#,%k.num) == $me ) { goto loop } else { inc %k.kick 1 mode # -v $nick(#,%k.num) goto loop } :done unset %k.* } mop { %k.num = 0 %k.total = $nick(#,0) %k.kick = 0 :loop inc %k.num 1 if ( %k.num > %k.total ) { goto done } elseif ( $nick(#,%k.num) == $me ) { goto loop } else { inc %k.kick 1 mode # +o $nick(#,%k.num) goto loop } :done unset %k.* } mdp { %k.num = 0 %k.total = $nick(#,0) %k.kick = 0 :loop inc %k.num 1 if ( %k.num > %k.total ) { goto done } elseif ( $nick(#,%k.num) == $me ) { goto loop } else { inc %k.kick 1 mode # -o $nick(#,%k.num) goto loop } :done unset %k.* } mk { %k.num = 0 %k.total = $nick(#,0) %k.kick = 0 :loop inc %k.num 1 if ( %k.num > %k.total ) { goto done } elseif ( $nick(#,%k.num) == $me ) { goto loop } else { inc %k.kick 1 raw -q kick # $nick(#,%k.num) Users has been kicked, reason: %kick.msg $+ goto loop } :done unset %k.* unset %kick.msg } mb { %k.num = 0 %k.total = $nick(#,0) %k.kick = 0 :loop inc %k.num 1 if ( %k.num > %k.total ) { goto done } elseif ( $nick(#,%k.num) == $me ) { goto loop } else { inc %k.kick 1 ban # $nick(#,%k.num) 2 goto loop } :done unset %k.* } mkb { %k.num = 0 %k.total = $nick(#,0) %k.kick = 0 :loop inc %k.num 1 if ( %k.num > %k.total ) { goto done } elseif ( $nick(#,%k.num) == $me ) { goto loop } else { inc %k.kick 1 ban # $nick(#,%k.num) 4 | raw -q kick # $nick(#,%k.num) Users has been banned from this channel, reason: %kick.msg $+ goto loop } :done unset %k.* unset %kick.msg }
then in nicklist
(Massive) .Mass Deop:/mdp .- .Mass Kick:/set %kick.msg $?="Enter a kick msg:" | mk .Mass Ban:/mb .Mass Kick Ban:/set %kick.msg $?="Enter a kick msg:" | mkb -
just another way
|
|
|
|
Joined: Dec 2002
Posts: 148
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 148 |
.... /me hides his eyes  Cobra^
|
|
|
|
parvez
|
parvez
|
Nicon thanks man! it worked cool
|
|
|
|
|