Channel Status - $status

By vSkyzv on Feb 19, 2009

This identifier was based off of one made by jonesy44 at http://www.hawkee.com/snippet/5665/.

I reconstructed it and removed the error messages for a shorter code. It returns the status of a user on a given channel in ~, &, @, %, +.

Usage: $status(Channel,Nick)

The .num property can be used to return the status in numbers:

~ = 5
& = 4
@ = 3
% = 2

  • = 1
    Regular User = 0

Usage of the ".num" property: $status(Channel,Nick).num

alias status {
  var %x = $left($remove($nick($1,$2).pnick,$2),1)
  if (!$prop) { return %x }
  elseif ($prop == num) { return $iif($replace(%x,+,1,%,2,@,3,&,4,~,5),$v1,0) }
}

Comments

Sign in to comment.
Savage_CL   -  Jul 14, 2011

Jethro_, note that .num is a property that isn't needed. This is like $nick($?"Chan?",$?"nick?").pnick without it, except it would only return the highest usermode.
I would do it with $left(...,1) $+ $nick
But that's just me.

 Respond  
Jethro   -  Feb 06, 2011

ChaChin, the status means users' ranks in the channel, be that as op, halfop, owner, admin, etc...it's nothing to do with channel or status window per se. What does the code do is to replace Owner with 5, Admin with 4, Op with 3, HalfOp with 2, and Voiced with 1. This is a custom alias which you need to use $status() to call from it.

I reckon the code can be done as such:

alias status {
  return $+(<,$replace($iif($left($nick($1,$nick).pnick,1) isin $prefix,$v1),+,1,%,2,@,3,&,4,~,5),$2,>)
}

Then use

$status(#,$nick)

as the custom identifier.

 Respond  
chachin   -  Feb 05, 2011

how do u use it.. is it just $status
on channel or wtf

 Respond  
PuNkTuReD   -  Feb 20, 2009

very handy little snippet
10/10

 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.