mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2010
Posts: 11
C
Pikka bird
OP Offline
Pikka bird
C
Joined: Jun 2010
Posts: 11
I can't seem to find any possibility to have an indication for people, who have set themselves as "away", in the user list of a channel. (like several other IRC-clients do by writing that nick(s) italic)
Even if one wanted to script something like that the user list does not provide the away-status, afaik.

If there is no solution possible on the current code-base I'd like to requeust either the implementation of such a feature by writing nicks in italic or another color or $users-choice-here
or the implementation of an away-flag which can be evaluated programatically by mIRC's scripting feature.

If I'm completely overseeing an already existing possibility, feel free to point me to the correct direction.

Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
You can use the built-in features of mIRC to color the nicknames of people who have been idle (i.e., haven't said anything in that channel for some preset time), but I'm not sure if that is exactly what you want. If it is, let me know and I'll show you how.

If you want it based on being marked as "away", it is a bit more complicated. When someone marks themself as away, your IRC client doesn't actually know about it unless you attempt to send a message to that user or perform a /WHOIS on the user or /WHO on the user/channel. So basically the most efficient way is to /WHO the channel on a short interval to keep your away list updated. This would require a small amount of scripting. Is this in line with what you're wanting to do?

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You can script this, and ultimately, you will need to anyway. As pointed out by drum, mIRC doesn't provide away status because the server doesn't either (not efficiently, anyway). You need to poll each individual user to get this data (or channel at best), and therefore this is not something you just get for free.

That said, a script can easily do this kind of polling and /cline the nick to the appropriate away colour determined by the script. I don't think it is mIRC's place to introduce complex server interactions like this, since there are many things at play (poll interval, custom commands on different ircds that might make this polling more efficient, etc.). Seems like something better left for a script.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jun 2010
Posts: 11
C
Pikka bird
OP Offline
Pikka bird
C
Joined: Jun 2010
Posts: 11
The second guess is correct, I'm looking for a thing based on the away-status. (not the idle-time)
Performing a whois on every single user and filtering out the needed line looks quite complicated to me and would extremely clutter my status-window. I guess there is some more fancy/sophisticated way of evaluating that(?)
I read about the who command of a channel now, I was unaware of that H/G flag yet. Nice one, that seems like it's worth an approach. :-)
Still I would need to better "hide" the response from the GUI. (yeh, I'm not the über-scripter, I always need to read the mIRC-help and google a lot and wouldn't know where to start/what to search for right now, to do that in a clean way (I would probably end up writing things to files and parse them which would be awful for that kind of action xD), any hints are appreciated)

Also thanks to argv0 for the explanation. I know most comparisons like that s***, but this functionality is built-in in quite a few IRC-clients (even the IMO not very user-friendly chatzilla has that feature besides more advanced ones like xchat). I wonder if they really put so much effort in that to adapt for different ircd's etc.(?) or if those clients are hammering the server in an "unsocial" way.
As the friend-list of Chatzilla for example takes aaaages (several minutes) to recognize a user of the friendlist coming online and mIRC even recognizes that without sharing a channel with that person almost instantly (I'm still very pleased about that), I was hoping it keeps a list about the away-status, too, as it seems the user-list handling is quite advanced when it comes to detecting users. (yes, obviously I was wrong on that ;-))
Looks like the other clients have found a very interesting way of maintaining that status then. :-o

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can hide responses from /who and /whois by halting the RAW events associated with those. Of course, you'll want to conditionally halt them because you don't want to hide them all of the time.

Considering how rare it is for people to set /away these days compared to the past, I'm not sure it's really worthwhile, but that's of course up to you. smile

As far as other IRC clients, I'm not sure how they do it, but because they are mostly all a LOT less used than mIRC, they can all hammer the servers and the servers probably aren't going to mind too much. If mIRC started doing that from every client out there, the servers would probably have a fit because there are so many mIRC clients out there. That's assuming that they do "hammer" the servers to maintain away statuses. Perhaps they only update away statuses every X minutes or something like that. Not accurate, but easier on the servers.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Note that mIRC does poll for your notify list every 30 seconds, but it uses the ISON command, which is much more efficient, and meant for specific users by name.

The issue here is that there is no efficient way to check away status. /WHO #channel might work, but mIRC does not issue /WHO on its own because it can cause other problems (/WHO has been known to flood users off on large channels when done incorrectly). Basically, that command is better left up to the user to deal with. Also, other scripts often need to issue /WHO on their own to update IAL-- if mIRC did this silently, there will be 2 /WHO commands being issued, which is wasteful. If it did not do it silently, it might trip up scripts that rely on WHO responses. What might be nice is for mIRC to fill $nick().away if it sees a proper WHO response, but not issue the command itself. That way users could put /WHO on a timer to get both IAL support and away status scripts working.

Note that other IRC clients might support this feature, but they probably work on a very slow polling rate. If mIRC did this people would complain that it is too slow and ask for it to be sped up, or even not interfere with their /WHO scripts (as mentioned above). Ultimately users would want more control over how things work. This is why mIRC introduced scripting-- so that custom and/or non-standard IRC interactions could be scripted by users in whatever way they wanted, and they would have full control over every detail. This is not possible with builtin functionality, but because many other IRC clients have no plugin/addon/script layer, adding these features as builtin functionality is their only answer. mIRC's answer seems better to me.

Just to clarify and echo what Riamus said, hiding output from /WHO and /WHOIS responses in mIRC is trivial, so that is not an issue. I believe drum offered to show you an example if this is what you want.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jun 2010
Posts: 11
C
Pikka bird
OP Offline
Pikka bird
C
Joined: Jun 2010
Posts: 11
Thanks for clarification on how the notify-list does that.

As you state it's dangerous if used incorrectly, of course I would assume it would be implemented properly and thoughtful, if it was implemented in the client. ;-)

Just a thought at the first look: If there are scripts which use the output of the /who command, it sounds even more desirable to me that mIRC would handle the /who command on it's own. Because it could then present the results via some kind of interface the (read: all) scripts could use, like the IAL.
In your scenario having several scripts could cause several /who-commands, too. So the issue of having more than one "who-source" does not seem to be solved by omitting this functionality in mIRC(?) One could also add a flag/option to enable/disable the built-in functionality in mIRC, and a script could take over, if desired by disabling mIRC's own polling.
But maybe I am missing some point there which would need to be considerated additionally.

Of course I would be interested in a script-based solution as drum offered for now, too. I wouldn't expect that feature being implemented that fast anyway. (if it was implemented at all, of course, which doesn't look like it right now ;-))

PS: outsourcing script attempt to the scripts section: https://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=233135

Last edited by commander_keen; 15/07/11 08:58 PM.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Even if mIRC would /who all chans say every 5mins - and I assume it never will, as the slight gain in "useful once in a while" funcionality can in no way justify the additional constant load for all IRC networks - there will always be some situation (or user) that - allegedly - requires a more up-to-date /who-result.
Also note that various IRCd take various parameters for the /who command, so replies to custom /who-requests could complicate attempts to get a reliable "full poll" if mIRC would not opt to ignore all custom replies at the cost of even more overhead.

Also bear in mind that while the notify list provides a definite result - a user is or ain't online - H/G has little informative value. There will always be plenty of users away yet not set away, and some users marked away while conducting jolly conversations. smile

Last edited by Horstl; 15/07/11 09:28 PM.
Joined: Jun 2010
Posts: 11
C
Pikka bird
OP Offline
Pikka bird
C
Joined: Jun 2010
Posts: 11
Originally Posted By: Horstl
Even if mIRC would /who all chans say every 5mins - and I assume it never will, as the slight gain in "useful once in a while" funcionality can in no way justify the additional constant load for all IRC networks

One could prevent that by providing the functionality and the interface but not activating the polling by default, but only on request. (e.g. a user-preference which offers to check for away-status and then activates it and/or when a script "registers" for that service)

Quote:
there will always be some situation (or user) that - allegedly - requires a more up-to-date /who-result.

Manual /who-commands should not be disabled by that functionality of course.

Quote:
Also note that various IRCd take various parameters for the /who command, so replies to custom /who-requests could complicate attempts to get a reliable "full poll" if mIRC would not opt to ignore all custom replies at the cost of even more overhead.

I have to admit I am not aware of the exact differences, but for now I would assume there is an intersection set most servers share which could be used in a useful manner.

Joined: Apr 2003
Posts: 342
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2003
Posts: 342
Originally Posted By: Riamus2
As far as other IRC clients, I'm not sure how they do it, but because they are mostly all a LOT less used than mIRC, they can all hammer the servers and the servers probably aren't going to mind too much. If mIRC started doing that from every client out there, the servers would probably have a fit because there are so many mIRC clients out there. That's assuming that they do "hammer" the servers to maintain away statuses. Perhaps they only update away statuses every X minutes or something like that. Not accurate, but easier on the servers.


In the early thru late 90's mac clients used userhost in groups every 30 seconds (25 nicks at a time) and would repeat this for every channel in five minute intervals. Over a 2,400bps PPP connection there was no noticeable latency. Hence it is highly effective. The /who #channel alternative was completely unacceptable under these conditions. 2,400 bps limits you to 300 characters per second.

Of course today using /who #channel every five minutes is the defacto choice because scripts have been doing it for years. The impact on the server is negligible. Even every client doing this repeatedly every 5 minutes would put little strain on a server. And the /userhost approach won't put ANY strain on the server.

I've brought this up before and people always refused to accept the /userhost approach. Probably because like so many IRC users they really thought they new *everything*. And it's not easy to script. But it pretty much foolproof.

People set /away all the time, btw.

Last edited by MeStinkBAD; 22/07/11 08:45 AM.

Beware of MeStinkBAD! He knows more than he actually does!
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Originally Posted By: MeStinkBAD
Of course today using /who #channel every five minutes is the defacto choice because scripts have been doing it for years. The impact on the server is negligible. Even every client doing this repeatedly every 5 minutes would put little strain on a server. And the /userhost approach won't put ANY strain on the server.


Again, you're missing the important point here:

By having mIRC issue its own /who internally, most clients will actually be issuing 2, not 1, /who commands on some interval, because scripts tend to perform their own. Someone on 20 channels performing 40 /who's every 5 minutes (one every 7 seconds) seems like considerable strain to me, especially since, because of SendQ issues on some networks, even issuing a single /who can occasionally flood a user off. This is why mIRC isn't getting involved with /who commands.

Finally, you simply cannot use /userhost here. Using /userhost would pretty much multiply load by 100x, since you have to issue N separate commands for each user on each channel. 20 channels with an average of 20 users = 400 commands every 5 minutes.. that's more than a command a second. And a user who's on just one channel with 400 users (fairly common on some networks) will have the same load. Total users on channels I'm on, on one network, is 1180 users. I'd be flooded off immediately. It's simply not scalable. Sometimes IRC users *do* know everything.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Nov 2004
Posts: 842
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
Actually, with userhost/userip, you can separate nicks with a space.

/userhost Jigsy argv0 ...



That said, it'd prolly still be inefficient.


What do you do at the end of the world? Are you busy? Will you save us?
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
According to the RFC, you can only list up to 5 nicknames, so that doesn't really solve much of the problem. At best it would make a 500 user channel more like a 100 user channel-- which is still way too many commands (join 3 of those channels and you're looking at a command a second just to keep up, which is again, not uncommon). mirc.net's raw list says that other networks might support more than 5 nicks, but mIRC could never rely on this, and it's unclear if we're talking 50 instead of 5, or just 8 or 10.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Mar 2012
Posts: 13
D
Pikka bird
Offline
Pikka bird
D
Joined: Mar 2012
Posts: 13
This could easily be done, its quite simple, use this code:

on *:LOGON:*:{
; CAP request for "away-notify" - This is required for this script to fully work!
raw CAP LS
raw CAP REQ :away-notify
raw CAP END
}
raw AWAY:*: {
if ($1) { echo -a $network 8,1AWAY:9,1 $nick 7,1is Away:11,1 $strip($1-) | halt }
if (!$1) { echo -a $network 8,1AWAY:9,1 $nick 7,1is Back! | halt }
}

This will output to the current window who goes away on what network, including the users reason.

In the current active window, it will show one of the following replies:
eg. AWAY -> Network AWAY: username is Away: away reason
eg. BACK -> Network AWAY: username is Back!

This script only shows in the active window who marks themselves as away, but it could be adjusted to mark the user list names if edited.

I do not know how to edit the user list in the client, not even sure you could, unless you scripted a full user list then applied this script to it.

Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Originally Posted By: Digi1977
This could easily be done, its quite simple, use this code:

Please note that will not work on many networks, as "away-notify" is a new, optional, and not-so-common server feature.


Saturn, QuakeNet staff

Link Copied to Clipboard