mIRC Home    About    Download    Register    News    Help

Print Thread
check if user isop #202159 16/07/08 02:34 PM
Joined: Mar 2007
Posts: 139
S
Solo1 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Mar 2007
Posts: 139
Hi again blush

How does mIRC know who is an operator on a channel using the identifier isop? i have tried looking at IRC in its raw format and found nothing in the users text (PRIVMSG) that would tell mIRC its an opped user talking.
Am i right in supposing that mIRC would keep track of every user thats opped by parsing the raw (example :Solo1!Solo1@address.com MODE #main +o solo1) and saves it somewhere and deletes it when the user is deopped or leaves the channel?

Thanks

Re: check if user isop [Re: Solo1] #202161 16/07/08 02:42 PM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline
Vogon poet
Offline
Vogon poet
J
Joined: May 2008
Posts: 127
if ($nick isop $chan) { msg $chan You are an Operator. }
else { msg $chan You are NOT an Operator. }

Re: check if user isop [Re: Joe_Dean] #202162 16/07/08 02:45 PM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline
Vogon poet
Offline
Vogon poet
J
Joined: May 2008
Posts: 127
Or, I believe you could stick an @ symbol in any of your events (an access level). e.g.:

on @:text:*blah*:#: { msg $chan You are an Operator! }

Not sure about that one though - my advice is use isop. I don't use the access levels much, but I'm pretty sure you could put an @ sign in there... try it out.

Re: check if user isop [Re: Joe_Dean] #202163 16/07/08 02:48 PM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline
Vogon poet
Offline
Vogon poet
J
Joined: May 2008
Posts: 127
Sorry for triple post, but you said something about a PM? Well, technically no one can be an OP in a PM, so if you wanted to check if that user was an OP, you'd have to include the channel to check in the script. e.g.:

if ($nick isop #mychan) { .msg $nick You are an operator in #mychan }

Re: check if user isop [Re: Joe_Dean] #202165 16/07/08 03:42 PM
Joined: Jul 2006
Posts: 3,829
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,829
The @ prefix always mean that you ($me) have to be an op.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: check if user isop [Re: Solo1] #202167 16/07/08 03:59 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Afaik mIRC is parsing the raw like you guessed, and does a /names #chan on join to get not only the nicks but their channel status as well.

A check for "isop" is sufficient to check for nick x having op on chan y.
To track "mode changes" of modes that may vary depending on the ircd used, like +a = "protect", you'd have to parse the "on rawmode" event on your own. In addition, you may compare a $nick(y,x).pnick to $prefix to $nickmode.


Last edited by Horstl; 16/07/08 04:09 PM.
Re: check if user isop [Re: Joe_Dean] #202172 16/07/08 07:10 PM
Joined: Mar 2007
Posts: 139
S
Solo1 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Mar 2007
Posts: 139
I know how to use the isop operator. My question was how mIRC parsed the raw sent to the client by the server.

Horst answered my question thank you

Re: check if user isop [Re: Solo1] #202227 18/07/08 03:20 AM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
mIRC does not store the information through RAW events or store it at all whatsoever,

ISOP is used to compare regular listed nicks has regular users or users with the SYMBOL @ inclusive in their nick from the server side.

Has you join a channel example #mirc with let's say 50% of users op'ed at no point in time does mIRC store the information anywhere, at most a names list check is performed.

So again mIRC does no store this information and ISOP is used to compare users in your list for which one has symbol @ <"Or equivelant"> in their nick.

Server has this information ready for the client "MIRC" to use.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: check if user isop [Re: Lpfix5] #202245 18/07/08 03:21 PM
Joined: Dec 2002
Posts: 2,025
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,025

I'm not quite sure exactly what you're saying, but I'll take a stab at it. Yes mIRC does store this information internally. If a nick is opped and then gets voiced and mIRC sees it, then the .pnick property for the $nick() identifier will show both @+ even though the nick is only prefixed with @ in the nick list. Also, ISVOICE would be true as well as ISOP.

Re: check if user isop [Re: RoCk] #202252 18/07/08 09:40 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
That only occurs if the client is sitting there to see it, else if you join the channel at no time is it stored to mirc.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }