$access

By Siddhant on Dec 16, 2007

Gets the status of the $nick.

Syntax: $access($nick,#channel) <- You must be in the channel specified. Otherwise, it won't work.

/*
$access
Written by: Siddhant Sutar
Email: siddhantsutar@yahoo.com
IRC: irc.DuelZone.org/irc.netstable.net
*/

alias access {
  if ($isid == $true) {
    var %access.nick = $1, %access.chan = $2, %x = 1
    while (%x <= $nick(%access.chan,0)) {
      if ($nick(%access.chan,%x) == %access.nick) goto access.loop
      else inc %x
    }
    :access.loop
    var %access.pnick = $nick(%access.chan,%x).pnick, %access.get = $remove(%access.pnick,%access.nick)
    if (~ isin %access.get) { .return isfounder }
    if (& isin %access.get) { .return issop }
    if (@ isin %access.get) { .return isop }
    if (% isin %access.get) { .return ishop }
    if (+ isin %access.get) { .return isvoice }
    if (%access.pnick == %access.nick) { .return isreg }
    else return $null
  }
}

Comments

Sign in to comment.
Technical_13   -  May 16, 2012

Can this be modified to pull the access level of any user? I want to be able to add it to a User Stat type script.

Siddhant  -  Aug 01, 2013

Yes.

Sign in to comment

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.