$status(Nick,[Channel])[.a]

By Jonesy44 on Jan 25, 2009

  ; $status(Nick,[Channel])[.a]
  ; Nick - Nickname of user on selected channel
  ; Channel - Channel to get status of user from (leave blank for $chan)
  ; Extras:
  ;     a - all statuses that user has
  ;     (leaving blank will return the highest status that user has)
  ;

Returns the symbol of the user, makes it easier to use than isop isvoice .. etc. also allows you to use user statuses such as & and ~ whereas mirc does not support it without a long non-memorable string whereas this is easier :)

alias status {
  ; $status(Nick,[Channel])[.a]
  ; Nick - Nickname of user on selected channel
  ; Channel - Channel to get status of user from (leave blank for $chan)
  ; Extras:
  ;     a - all statuses that user has
  ;     (leaving blank will return the highest status that user has)
  ;
  if (!$1) { return 2* $!status: insufficient paramaters [$status(Nick,[Channel])[.a]] | echo -a 2- }
  else {
    var %x = $nick($iif($2,$v1,$chan),$1).pnick
    if (!%x) { return 2* $!status: error, no such nickname $qt($1) on channel $iif($2,$v1,$chan) }
    else { return $iif($prop == a,$remove(%x,$1),$mid($remove(%x,$1),1,1)) }
  }
}

Comments

Sign in to comment.
Jonesy44   -  Jan 26, 2009

Teeeheee :P but re-read my comment :P

 Respond  
SumWon   -  Jan 25, 2009

jonesy44 - mIRC Snippet: $numsuf() Posted on Jan 25, 2009 4:09 pm "You've been napa'd!"

Haha

 Respond  
Jonesy44   -  Jan 25, 2009

i hear yah, i know it's not really cutting it much. but it's one i ALWAYS forget lol

 Respond  
napa182   -  Jan 25, 2009

nice work but you could just use

if ($nick(#,$nick,~&%)) {

to check if the nick is owner, admin, or halfop

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.