Snippets Project Page
Author: entropy
Added: 5y
Updated: 5y
mIRC: 7.52+
Hits: 992
Downloads: 16
Review: entropy
Size: 1.79KB
1 0
Login to vote.
Remove All Bans For Nick
v1.0
Example: /rembans #chan nick!*@*
Removes all bans of nick on #chan.
Download
JSON
▲ Review
▼ Source
; Remove All Bans For Nick v1.0 - by entropy 2018 ; Example: /rembans #chan nick!*@* ; Removes all bans of nick on #chan. alias rembans { var %a = 1, %b, %look while (%a <= 20) { %b = $iif(! isin $2,$mask($2,%a),$+($2,!*@*)) var %x = 1, %y while ($ibl($1,%x)) { %y = $v1 if (%b iswm %y || %y iswm %b) { if (!$istok(%look,%y,32)) { %look = %y %look } } elseif ($+($2,!*@*) iswm %y && !$istok(%look,%y,32)) { %look = $+($2,!*@*) %look } inc %x } inc %a } if (%look) { pushmodex $1 $+(-,$str(b,$numtok(%look,32))) %look } } 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