Welcome
With this identifier you get the status of any nick from the channel. (op, voice, or regular)
; ------------------------------
; $c.status() identifier by HaNtU]uU[
; $c.status(nick,#channel) returns the current status of the user.
; eg: @nick if \"nick\" is op, +nick is \"nick\" is voiced
; $c.status(nick,#channel).prop returns $true if the user is op'd/voice'd/a regular in the channel.
; properties are:
; $c.status(nick,#channel).op
; $c.status(nick,#channel).vo
; $c.status(nick,#channel).reg
; it might be useful when you want to customize your ON TEXT and ON INPUT :)
; ------------------------------
ALIAS c.status {
; now it checks if it has a property and the property is a proper one.
; then it returns the correct answer ;)
if (($prop) && ($istok(op.vo.reg,$prop,46))) { return $iif($1 is [ $+ [ $prop ] ] $2,$true,$false) }
; otherwise it return the current status of the user in $2 (specified channel)
else {
if (($1 isop $2) && ($1 isvo $2)) || (($1 isop $2) && ($1 !isvo $2)) { return @ $+ $1 }
elseif (($1 !isop $2) && ($1 isvo $2)) { return + $+ $1 }
else { return $1 }
}
}