mIRC Home    About    Download    Register    News    Help

Print Thread
#171425 24/02/07 08:33 AM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
This is weird. Im using who $nick with raw 352 to check someones usertag ($9-) to say whether they are a script or a browser.

Raw 352, $2 == $chan
So lets say I /who $nick in $chan(3)

My problem is most nicknames return $chan(3) for $2, but some of these are returning $chan(1). So it appeared at first that if the nick was also in $chan(1) it returned $chan(1), but there are some nicks that are in $chan(1) and raw 352 returns the correct channel. ($chan(3)) Do I make sense? THIS DOESN'T!! :p

I use $2 to message the channel they are in.
on join:/who $nick
raw 352:if (its not webchat) msg $2 $6 is a script!

I know I can set a variable on join to save the channel name to work around it, but I want to know why this is doing this!

Any ideas?

DJ_Sol #171451 24/02/07 01:37 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
/who isn't channel-specific. mIRC looks at your open channels and labels them based on the order you joined them. The /who (most likely) lists the channels a user is in based on the order they joined the channels. Obviously, these won't always be the same thing. So when you use /who, the $2 is probably the first channel the user joined, which isn't necessarily your $chan(1).

As a disclaimer, I don't really know the answer. This is all speculation, but I wouldn't be surprised if I was correct. smile


Invision Support
#Invision on irc.irchighway.net
Riamus2 #171453 24/02/07 02:21 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I regret to inform you that your suggestion doesn't match up with the information located here

It states
Quote:
If the user is on multiple channels, only one will be returned. If the WHO was performed on a channel, this will always be the channel that was requested.


Unfortunately this doesn't help understand why the original poster is obtaining the results he is.

RusselB #171454 24/02/07 02:50 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
The OP isn't performing the /who on a channel, he's performing it on the nick, so that doesn't apply.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
DJ_Sol #171461 24/02/07 05:18 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
I believe the previous posters are correct. If you /who #channel1, the response will always show each nick as being on #channel1. However, if you /who Nick, the IRC server will return the first channel that the user joined on that server.

Even though you are typing /who Nick in a channel window, the IRC server has no idea which window you are typing in. The command sent to the server (/who nick) doesn't reflect the channel name in any way.

-genius_at_work

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: genius_at_work
Even though you are typing /who Nick in a channel window, the IRC server has no idea which window you are typing in. The command sent to the server (/who nick) doesn't reflect the channel name in any way.


Exactly. smile


Invision Support
#Invision on irc.irchighway.net
Riamus2 #171481 24/02/07 08:33 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Ok Thanks!! I learned something new!! I will just set the channel as a variable on join. laugh


Link Copied to Clipboard