Snippets Project Page
Author: entropy
Added: 5y
Updated: 5y
mIRC: 7.52+
Hits: 1,008
Downloads: 20
Review: entropy
Size: 2.41KB
2 0
Login to vote.
!unbanall
v1.0
Simply load this, then !unbanall (on chans you are op on, it will unban all bans on #chan)
Download
JSON
▲ Review
▼ Source
; !unbanall v1.0 - by entropy 2018 ; Simply load this, then !unbanall (on chans you are op on, it will unban all bans on #chan) on *:input:#:{ if ($me isop # && !unbanall == $1) { checkit # $me } } on @*:text:!unbanall:#:{ if ($nick isop #) { checkit # $nick } } alias -l checkit { var %a = 1, %all | while ($ibl($1,%a)) { %all = %all $v1 | inc %a } | if (%all) { pushmodex $1 $+(-,$str(b,$numtok(%all,32))) %all } } alias -l pushmodex { 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) { mode %chan %a %b var %a = "" , %b = "" } } inc %x } if (%a) { mode %chan %a %b } } 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