;; on @*:rawmode:#mychannel:{ if ($i-check($1)) { mode # -i } }
;; maybe you notice it, i hate regex ;)
alias i-check {
var %x = $1,%i,%t,%o,%y
if (+ isin %x) && (i isincs %x) {
%y = $len(%x)
while (%y) {
%t = $mid(%x,%y,1)
if (%t == -) { unset %i } | if (%t == +) && (%i) { %o = $true | unset %i } | if (%t == i) { %i = $true }
dec %y
}
if (%o) { return $true }
else { return $false }
}
else { return $false }
}