Snippets Project Page
Author: entropy
Added: 5y
Updated: 5y
mIRC: 7.52+
Hits: 977
Downloads: 22
Review: entropy
Size: 1.54KB
2 0
Login to vote.
Voice/Devoice All
v1.0.5
This snippet is pretty self-explanatory. It voices all and devoices all.
Download
JSON
▲ Review
▼ Source
; Voice/Devoice All v1.0.5 - by entropy 2018 ; Syntax: /vall and /dvall alias vall { if ($me isop #) { var %a = 1, %b, %re | while ($nick(#,%a,r)) { %re = %re $v1 | inc %a } | pushmodex # $+(+,$str(v,$numtok(%re,32))) %re } } alias dvall { if ($me isop #) { var %a = 1, %b, %re | while ($nick(#,%a,v)) { %re = %re $v1 | inc %a } | pushmodex # $+(-,$str(v,$numtok(%re,32))) %re } } alias -l pushmodex { if (-t* iswm $1) { var %time = $mid($1,3) , %count = 0 | tokenize 32 $2- } else { var %time = 0 , %count = 0 } var %modespl = $modespl , %chan = $1 , %modes = $2 , %parms = $3- , %x = 1 , %y = $len(%modes) , %lwhich = + , %which = + , %a , %b tokenize 44 $chanmodes var %t1 = $1 , %t2 = $nickmode $+ $2 , %t3 = $3 , %t4 = $4 tokenize 32 %parms while (%x <= %y) { var %t = $mid(%modes,%x,1) if (%t isin +-) { var %lwhich = %which , %which = %t } else { if (%t isincs $gettok(%t1 %t2 %t3, 1- $pos(.-+, %which),32)) { var %b = %b $1 tokenize 32 $2- } var %a = $+(%a,$iif(!%a || %lwhich != %which,%which),%t) , %lwhich = %which if ($len($remove(%a,+,-)) = %modespl) { if (!%time) { mode %chan %a %b } else { .timer -m 1 $calc(%time * %count) mode %chan %a %b } var %a = "" , %b = "", %count = %count + 1 } } inc %x } if (%a) { if (!%time) { mode %chan %a %b } else { .timer -m 1 $calc(%time * %count) mode %chan %a %b } } }
Changelog:
0
0