mIRC Homepage

IRC - Possible to get a nicks curent modes

Posted By: ident

IRC - Possible to get a nicks curent modes - 27/04/12 10:42 PM

Is it possible to a nick's user mode level. Example

/mode #channel nick

would return

nick +o(op) #test or nick +q #test etc....

Any ideas?
Posted By: maroon

Re: IRC - Possible to get a nicks curent modes - 28/04/12 01:50 AM

//echo -a $nick(#channelname,NICK).pnick will show that nick prefixed by their channel status. i.e. @NICK or +NICK instead of just NICK.

However you must be aware that it will show multiple modes only if you were in channel while they were given the lesser status, otherwise you would only see the highest status level.

For example, after /mode #test +ov NICK NICK, $nick(#test,NICK).pnick will return @+NICK. However if you /hop to leave the channel and return, you will find that it now returns only the highest status @NICK.
Posted By: ident

Re: IRC - Possible to get a nicks curent modes - 28/04/12 07:04 PM

Thanks for the reply but that's not going to work. I aint using mIRC. I am looking for if one exists a IRC command that can do this.
Posted By: maroon

Re: IRC - Possible to get a nicks curent modes - 28/04/12 11:21 PM

well, when you come to an mirc board asking about non-mirc information, it would help if you could make that a little more clear.

If your irc client can do "/who #channel_name", you should be getting a raw-352 reply giving information about everyone in that channel, with one of the parameters giving the status within the limitations i mentioned above.
Posted By: Watchdog

Re: IRC - Possible to get a nicks curent modes - 29/04/12 01:50 AM

What you are asking for depends on network security settings and are usually reserved for opers. The modes you are referring to are not user modes but channel modes that apply to certain privileged users - big difference.
Posted By: ident

Re: IRC - Possible to get a nicks curent modes - 29/04/12 02:18 AM

Marron - section description ( Use this forum to talk about IRC....)

It does not matter if it's a privileged user. It was a simple question if a command existed to get a nicks current level.

you would not WHO a channel on a single user mode change. Imagine if there was 200+ users. Be quicker to whois the nick and split the raw numeric 319 reply
Posted By: maroon

Re: IRC - Possible to get a nicks curent modes - 29/04/12 02:25 AM

i tried the /who #channel at a network where i have no status. I'm referring to the reply looking like

#channelname nick value userid@host otherstuff

the value i'm seeing contains a + if someone is a voice, and contains a @ if they're an op.

Watchdog, you're saying that the /who reply is configurable to not even give the op/voice information for a channel you're in? I'm assuming the OP is referring to variants of ircd where +q is founder level status of the channel, and they appear in nicklist preceded by a ~ or other symbol similar to the way ops are preceded by @.
Posted By: sparta

Re: IRC - Possible to get a nicks curent modes - 29/04/12 08:38 AM

Try add this to your remote. ALT + R in mirc..

raw *:* { echo -a $1- 4> $numeric }

Now you will see the text displayed with the: /who #channel

And if you want to use that information.
Code:
raw *:* {
  if ($numeric == 352) { haltdef | echo -a $1- }
  elseif ($numeric == 1) { haltdef }
}

haltdef will halt default text to show up in the status window. Dont know if this is what you looking for..
Posted By: starbucks_mafia

Re: IRC - Possible to get a nicks curent modes - 30/04/12 11:52 AM

You can either use the NAMES #channel command to get that info for all nicks on a given channel or you can use WHOIS nick to get that info for nick on each channel he is on.

In the case of NAMES the response will be a 353 numeric and the nicks will be listed with the appropriate status prefixes before their nick (eg. @+nick1 @nick2 nick3).

For WHOIS you want to check numeric 319, which will list the channels that the specified nick is on, prefixed by status symbols (eg. @+#chan1 @#chan2 #chan3).

See the relevant IRC RFCs (1459 and 2812) or a raw IRC connection for the precise format of the responses.

Note 1: If you aren't on a given channel with a given nick you probably won't be able to see their status/prefix unless you have certain usermodes usually reserved for opers/admins on a server.

Note 2: Some servers will only provide the 'highest' status prefix in the 353/319 responses. For instance a nick who is both opped and voiced on a channel may appear as @nick when you would expect him to appear as @+nick. This is exactly as stupid as it seems and fortunately these servers are rare nowadays.
© 2022 mIRC Discussion Forums