; $reqmode(<prefix or nickmode>[,<chan>,<nick>])
; a) if <prefix or nickmode> is provided only, return corresponding and all higher prefixes
; example: on a default unreal IRCd, both $reqmode(a) and $reqmode(&) will return: "~&"
; b) if chan and nick are provided, return $true if <nick> has at least <prefix or nickmode>-status on <chan>
; example: if you're "&%" in #chan, $reqmode(~,#chan,$me) returns $false and $reqmode(o,#chan,$me) returns $true
alias reqmode {
var %p = $iif(($1 isincs $prefix) || ($1 isincs $nickmode),$mid($prefix,1,$poscs($v2,$v1,1)))
return $iif(($2 == $null),%p,$iif(($3 !isreg #$2) && ($left($nick($v2,$v1).pnick,1) isincs %p),$true,$false))
}