mIRC Home    About    Download    Register    News    Help

Print Thread
#202159 16/07/08 02:34 PM
S
Solo1
Solo1
S
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

#202161 16/07/08 02:42 PM
J
Joe_Dean
Joe_Dean
J
if ($nick isop $chan) { msg $chan You are an Operator. }
else { msg $chan You are NOT an Operator. }

#202162 16/07/08 02:45 PM
J
Joe_Dean
Joe_Dean
J
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.

#202163 16/07/08 02:48 PM
J
Joe_Dean
Joe_Dean
J
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 }

#202165 16/07/08 03:42 PM
Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
The @ prefix always mean that you ($me) have to be an op.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
#202167 16/07/08 03:59 PM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
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.
#202172 16/07/08 07:10 PM
S
Solo1
Solo1
S
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

#202227 18/07/08 03:20 AM
Joined: Aug 2005
Posts: 1,052
L
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.

Joined: Dec 2002
Posts: 1,995
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,995

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.

RoCk #202252 18/07/08 09:40 PM
Joined: Aug 2005
Posts: 1,052
L
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.


Link Copied to Clipboard