isowner alias and isprotect alias

By ITSOVER9000 on Nov 20, 2011

Basically, the only reason I made this was because instead of having to type the long .pnick version in a script, I can type if ($isowner/$isadmin(Nick) == Yes) {
stuff
}
instead of having to type if ($left($nick($chan,$nick).pnick,1) == ~/&) {
stuff
}
Well, that's it.

alias isowner {
  if ($1) {
    if ($left($nick($chan,$1).pnick,1) == ~) { 
      return Yes
    }
    else {
      if ($1 !ison $chan) {
        return $1 is not on this channel.
      }
      else { 
        return No
      }
    }
    else {
      return $!isowner(NickName)
    }
  }
}
alias isadmin {
  if ($1) {
    if ($left($nick($chan,$1).pnick,1) == &) { 
      return Yes
    }
    else {
      if ($1 !ison $chan) {
        return $1 is not on this channel.
      }
      else { 
        return No
      }
    }
    else {
      return $!isprotect(NickName)
    }
  }
}

Comments

Sign in to comment.
Skywalker   -  Nov 27, 2011

how can i use this with $me instead of $nick?

 Respond  
_Dean_   -  Nov 21, 2011

i will give you a 8/10 +like, since i liked the idea

 Respond  
Jethro   -  Nov 20, 2011

No, you need this, because isowner doesn't usually, and most likely it won't, function for the regular IRCD, but $nick($chan,$nick,~) and $nick($chan,$nick,&) will work for both IRCD and IRCX.

 Respond  
ITSOVER9000   -  Nov 20, 2011

Oh, it sounds like I didn't really need to make this then, since it has already been done.

 Respond  
Jethro   -  Nov 20, 2011

I'll quote this below to defuse the "confusion:"

Version History of mIRC 5.61
Fixed lock dialog password bug.
Improved support for IRCX servers:
Added property $nick().owner, isowner if comparison, and q\r property to $nick(#,N,aohvrq,aohvrq) where q is for owners.
Added on OWNER/DEOWNER events, work the same as on OP/DEOP, and $mode().owner/deowner properties.

 Respond  
ITSOVER9000   -  Nov 20, 2011

Oh, ok. :)

 Respond  
Jethro   -  Nov 20, 2011

you can still use isowner.

isowner by itself is undocumented indeed, but it's merely an operator.

Using $isowner() will not create any conflict nor "confusion." No harm no foul!

 Respond  
ITSOVER9000   -  Nov 20, 2011

Well then, thank you for the advice. I also changed alias isowner { to alias isowner { since you said isowner already existed. Thank you Jethro and Dean.

 Respond  
Jethro   -  Nov 20, 2011

Dean, it wasn't my fault to misread your comment, because you didn't explain it thoroughly in your very first comment initially. I agree with ITSOVER9000. You shouldn't hate but retrospect what you wrote.

 Respond  
ITSOVER9000   -  Nov 20, 2011

Oh. I probably should do that, I couldn't understand that that was what you wanted me to do from your first comment.

 Respond  
_Dean_   -  Nov 20, 2011

Jethro
why dont you use "isadmin"?
There is no such thing as "isadmin" operator, Mr. Dean.

i hate when lame ppl comment on my posts, with lame answers... i said to him, there is already an operator called isprotect... i asked him, if he could change the name of his identifier to "isadmin" instead "isprotect" since it may confuse the other ppl with the "isprotect" operator...

 Respond  
ITSOVER9000   -  Nov 20, 2011

OH.

 Respond  
Jethro   -  Nov 20, 2011

why dont you use "isadmin"?There is no such thing as "isadmin" operator, Mr. Dean.

isowner does exist, but it doesn't necessarily work for IRCD. isowner is mostly used in IRCX releated servers.

 Respond  
ITSOVER9000   -  Nov 20, 2011

I guess I don't know how to use it then. I'm dumb. ._.

 Respond  
_Dean_   -  Nov 20, 2011

the isprotect operator works... i think you dont know how to use it...
from the mIRC help file

isprotect if v1 is a user in your protect list for channel v2 (v2 optional)

Protect

If you are on a channel and you have channel Op status, any users that match the nicknames in the protect list will be automatically protected. mIRC does this by kicking or de-opping anyone who tries to kick or de-op your protected users.

the isprotect, on mIRC is an operator for conditions, in this case it will check if v1 is a protected nick on your protect list... i just give you a tip, for, why not use isadmin, instead isprotect, since it may confuse the other ppl...

 Respond  
ITSOVER9000   -  Nov 20, 2011

Because the undocumented isowner and isadmin don't work?

 Respond  
_Dean_   -  Nov 20, 2011

there is already an operator called "isprotect" why dont you use "isadmin"?
for those who will say, i know the difference between the operators and aliases, and it may confuse the other ppl

 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.