יוצר: Ohad
גירסא: 1.04
תיאור: הקוד מאפשר לכם לתת ולהוריד דרגות (qaohv beI) בצורה המונית
הפעלה: מוסבר בתחילת הקוד
קוד: בחר הכל
; ——————————————————————————————————————————————— ;
; Mass code by Ohad v1.04
; This code let you to give and take user modes in channel (qaohv)
; Syntax: /mass [#channel] <[+|-]modes> [wildcard]
;
; /mass #mIRC -ov ---> remove all the ops and the voices in #mIRC
; /mass #mIRC +hv ---> give to all users in #mIRC half-op and voice
; ——————————————————————————————————————————————— ;
alias mass {
var %c $iif(#* iswm $1,$1,$active)
if (#* iswm $1) { tokenize 32 $2-3 }
if ($left($1,1) !isin +-) { tokenize 32 + $+ $1-2 }
if ($me isop %c || $me ishop %c) && ($regex(m,$1,/^([+-])((?:([ $nickmode ])(?!.*\3))+)$/x)) {
var %x 1,%y,%d,%n,%nick,%w $iif($2,$2,*)
while ($nick(%c,%x,$iif($regml(m,1) == -,$regml(m,2),a))) {
%nick = $v1
if ($v1 != $me) && (%w iswm $v1) { %n = $regsubex(m2,$regml(m,2),/([ $+ $iif($regml(m,1) == -,^) $pre($nick(%c,%nick).pnick) ]+)/gs,) | %d = $+(%d,%n) | %y = %y $str(%nick $chr(32),$len(%n)) }
if ($len(%d) >= $modespl) { mode %c $+($regml(m,1),$mid(%d,1,$modespl)) $gettok(%y,1- $modespl,32) | %y = $gettok(%y,$calc($modespl +1) -,32) | %d = $mid(%d,$calc($modespl +1)) }
inc %x
}
if (%y) { mode %c $+($regml(m,1),%d) %y }
}
}
alias -l pre { return $regsubex($1,/([ $prefix ]?)[^ $prefix ]?/gs,$mid($nickmode,$pos($prefix,\1),1)) }