This would make displaying of the away status in irc clients possible without the need for WHO polling which is not a nice way to do it. More information: http://ircv3.atheme.org/extensions/away-notify-3.1
Of course this only works with irc servers/networks that support this feature. As far as I know this should work on freenode, which is one of the biggest networks.
This would make displaying of the away status in irc clients possible without the need for WHO polling which is not a nice way to do it. More information: http://ircv3.atheme.org/extensions/away-notify-3.1
Of course this only works with irc servers/networks that support this feature. <del>As far as I know this should work on freenode, which is one of the biggest networks.</del>
## <bountysource-plugin>
The **[$30 bounty](https://www.bountysource.com/issues/141917-add-support-for-away-notify-at-capability-negotiation-time?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue has been claimed at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
</bountysource-plugin>
<!-- github-sync-id:12894285 -->
I'll go ahead and share the solution I tossed together for myself, though it is as of yet not ideal. It could be improved upon in a few ways, I think, with some additional code, but as it is the proper solution is to wait for cap-notify and then implement it properly that way.
The module away_notify can be found here along with some additional notes.
I'll go ahead and share the solution I tossed together for myself, though it is as of yet not ideal. It could be improved upon in a few ways, I think, with some additional code, but as it is the proper solution is to wait for [cap-notify](https://github.com/ircv3/ircv3-specifications/blob/master/extensions/cap-notify-3.2.md) and then implement it properly that way.
The module away_notify can be found [here](https://github.com/NuclearW/znc-modules/tree/master/away_notify) along with some additional notes.
<!-- github-comment-id:50793552 -->
Support for away-notify would also be nice to have in core. WeeChat and many other clients support it, but they fallback to something else than away-notify when it's not supported. I don't remember what it was.
Support for `away-notify` would also be nice to have in core. WeeChat and many other clients support it, but they fallback to something else than `away-notify` when it's not supported. I don't remember what it was.
<!-- github-comment-id:50794980 -->
It would indeed, but it has the same problems that the module I wrote has. Namely one cannot know during capability exchange before authentication if the client connecting is connecting to a network that supports away-notify.
Once cap-notify is no longer a moving target and IRCds start supporting it, adding away-notify and other capabilities to the core proper will be possible in a proper manner.
I imagine WeeChat falls back to doing WHO polling of channels periodically (this is what HexChat does, at least).
It would indeed, but it has the same problems that the module I wrote has. Namely one cannot know during capability exchange before authentication if the client connecting is connecting to a network that supports `away-notify`.
Once `cap-notify` is no longer a moving target and IRCds start supporting it, adding `away-notify` and other capabilities to the core proper will be possible in a proper manner.
I imagine WeeChat falls back to doing `WHO` polling of channels periodically (this is what HexChat does, at least).
<!-- github-comment-id:50795331 -->
Namely one cannot know during capability exchange before authentication if the client connecting is connecting to a network that supports away-notify.
Oh, so this is the issue, I didn't understand this before.
Once cap-notify is no longer a moving target and IRCds start supporting it, adding away-notify and other capabilities to the core proper will be possible in a proper manner.
Is IRCd support really required? Why would anyone support it if no one else supports it either and most of networks aren't upgrading IRCds so often, so there would still be issue of the network maybe not supporting cap-notify.
I imagine WeeChat falls back to doing WHO polling of channels periodically (this is what HexChat does, at least).
Probably. The help text only says rc.server_default.away_check: interval between two checks for away (in minutes, 0 = never check) [default: "0", values: 0 .. 10080. It seems to be 1 for me and whoing medium number of channels which I am currently doesn't seem to be a good idea for me when away-notify is supported by the network.
WeeChat also has variable for setting maximum number of nicks on channel where to check away status and this seems to be set 0 to me (unlimited) while it defaults to 25.
> Namely one cannot know during capability exchange before authentication if the client connecting is connecting to a network that supports away-notify.
Oh, so this is the issue, I didn't understand this before.
> Once cap-notify is no longer a moving target and IRCds start supporting it, adding away-notify and other capabilities to the core proper will be possible in a proper manner.
Is IRCd support really required? Why would anyone support it if no one else supports it either and most of networks aren't upgrading IRCds so often, so there would still be issue of the network maybe not supporting cap-notify.
> I imagine WeeChat falls back to doing WHO polling of channels periodically (this is what HexChat does, at least).
Probably. The help text only says `rc.server_default.away_check: interval between two checks for away (in minutes, 0 = never check) [default: "0", values: 0 .. 10080`. It seems to be `1` for me and `who`ing medium number of channels which I am currently doesn't seem to be a good idea for me when `away-notify` is supported by the network.
WeeChat also has variable for setting maximum number of nicks on channel where to check away status and this seems to be set `0` to me (unlimited) while it defaults to `25`.
<!-- github-comment-id:50812037 -->
Is IRCd support really required? Why would anyone support it if no one else supports it either and most of networks aren't upgrading IRCds so often, so there would still be issue of the network maybe not supporting cap-notify.
Now that I think about it more, no actually. We just need clients to support it to make it useful to us. znc'd offer cap-notify at connection time, then if the client has it znc could then enable the network-specific capabilities before playing back buffer on a connection with the network already connected, or later on when znc itself connects to the network.
> Is IRCd support really required? Why would anyone support it if no one else supports it either and most of networks aren't upgrading IRCds so often, so there would still be issue of the network maybe not supporting cap-notify.
Now that I think about it more, no actually. We just need clients to support it to make it useful to us. znc'd offer `cap-notify` at connection time, then if the client has it znc could then enable the network-specific capabilities before playing back buffer on a connection with the network already connected, or later on when znc itself connects to the network.
<!-- github-comment-id:50823479 -->
I am running ZNC with `-D` at the moment and it seems to be mostly `WHO` replies.
I haven't heard anything useful from clients and I know only WeeChat (https://github.com/weechat/weechat/issues/182) to have issue about `cap-notify` and nothing seems to have happened there. There was only weird sounding suggestion to make ZNC just disconnect clients when it's not connected to server (https://github.com/weechat/weechat/issues/182#issuecomment-53982865).
<!-- github-comment-id:56156738 -->
We were just discussing about this at #znc at freenode and noticed that I have very high amount of traffic which I think is mostly caused by WHO. Another person pasted their traffic which was 2GiB in one week.
We were just discussing about this at #znc at freenode and noticed that I have very high amount of traffic which I think is mostly caused by `WHO`. Another person pasted their traffic which was 2GiB in one week.
```
2014-09-19 19:41:41+0300 < *status> +----------+-------+--------+--------+
2014-09-19 19:41:41+0300 < *status> | Username | In | Out | Total |
2014-09-19 19:41:41+0300 < *status> +----------+-------+--------+--------+
2014-09-19 19:41:41+0300 < *status> | Mikaela | 3 GiB | 3 GiB | 6 GiB |
2014-09-19 19:41:41+0300 < *status> | <Users> | 3 GiB | 3 GiB | 6 GiB |
2014-09-19 19:41:41+0300 < *status> | <ZNC> | 8 KiB | 21 KiB | 29 KiB |
2014-09-19 19:41:41+0300 < *status> | <Total> | 3 GiB | 3 GiB | 6 GiB |
2014-09-19 19:41:41+0300 < *status> +----------+-------+--------+--------+
2014-09-19 19:41:43+0300 < *status> Running for 3d 9h 28m 55s
```
<!-- github-comment-id:56202498 -->
cap-notify might not even be required for a prototype implementation... I think sending an unsolicited CAP LS would cause most existing clients to react in the expected way and request newly available caps.
(Edit: Thinking about it a bit more, I'm actually quite surprised it works at all.)
`cap-notify` might not even be required for a prototype implementation... I think sending an unsolicited CAP LS would cause most existing clients to react in the expected way and request newly available caps.
(Edit: Thinking about it a bit more, I'm actually quite surprised it works at all.)
<!-- github-comment-id:56203810 -->
Using unsolicited CAP LS works at least for HexChat, and I've an away_notify_unsolicited module which uses that method here now.
@grawity
Using unsolicited CAP LS works at least for HexChat, and I've an away_notify_unsolicited module which uses that method [here](https://github.com/NuclearW/znc-modules/tree/master/away_notify) now.
<!-- github-comment-id:56394661 -->
The unsolicited CAP LS worked with HexChat, but was tested and shown not to work with weechat. It is not an acceptable solution at this point.
The unsolicited `CAP LS` worked with HexChat, but was tested and shown not to work with weechat. It is not an acceptable solution at this point.
<!-- github-comment-id:56912254 -->
It would indeed, but it has the same problems that the module I wrote has. Namely one cannot know during capability exchange before authentication if the client connecting is connecting to a network that supports away-notify.
cap-notify does not solve this problem. All capabilities are listed in CAP LS, and the spec says you should use CAP LS for discovery. Whatever weechat's problem is, it's not to do with CAP LS.
In other words why wouldn't the client know it's connecting to a network that supports away-notify. Is this some weird bouncer quirk? Can someone explain it?
@NuclearW said:
> It would indeed, but it has the same problems that the module I wrote has. Namely one cannot know during capability exchange before authentication if the client connecting is connecting to a network that supports away-notify.
`cap-notify` does not solve this problem. All capabilities are listed in `CAP LS`, and the spec says you should use `CAP LS` for discovery. Whatever weechat's problem is, it's not to do with `CAP LS`.
In other words why wouldn't the client know it's connecting to a network that supports `away-notify`. Is this some weird bouncer quirk? Can someone explain it?
<!-- github-comment-id:87590808 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This would make displaying of the away status in irc clients possible without the need for WHO polling which is not a nice way to do it. More information: http://ircv3.atheme.org/extensions/away-notify-3.1
Of course this only works with irc servers/networks that support this feature.
As far as I know this should work on freenode, which is one of the biggest networks.The $30 bounty on this issue has been claimed at Bountysource.
I'll go ahead and share the solution I tossed together for myself, though it is as of yet not ideal. It could be improved upon in a few ways, I think, with some additional code, but as it is the proper solution is to wait for cap-notify and then implement it properly that way.
The module away_notify can be found here along with some additional notes.
Support for
away-notifywould also be nice to have in core. WeeChat and many other clients support it, but they fallback to something else thanaway-notifywhen it's not supported. I don't remember what it was.It would indeed, but it has the same problems that the module I wrote has. Namely one cannot know during capability exchange before authentication if the client connecting is connecting to a network that supports
away-notify.Once
cap-notifyis no longer a moving target and IRCds start supporting it, addingaway-notifyand other capabilities to the core proper will be possible in a proper manner.I imagine WeeChat falls back to doing
WHOpolling of channels periodically (this is what HexChat does, at least).Oh, so this is the issue, I didn't understand this before.
Is IRCd support really required? Why would anyone support it if no one else supports it either and most of networks aren't upgrading IRCds so often, so there would still be issue of the network maybe not supporting cap-notify.
Probably. The help text only says
rc.server_default.away_check: interval between two checks for away (in minutes, 0 = never check) [default: "0", values: 0 .. 10080. It seems to be1for me andwhoing medium number of channels which I am currently doesn't seem to be a good idea for me whenaway-notifyis supported by the network.WeeChat also has variable for setting maximum number of nicks on channel where to check away status and this seems to be set
0to me (unlimited) while it defaults to25.Now that I think about it more, no actually. We just need clients to support it to make it useful to us. znc'd offer
cap-notifyat connection time, then if the client has it znc could then enable the network-specific capabilities before playing back buffer on a connection with the network already connected, or later on when znc itself connects to the network.I am running ZNC with
-Dat the moment and it seems to be mostlyWHOreplies.I haven't heard anything useful from clients and I know only WeeChat (https://github.com/weechat/weechat/issues/182) to have issue about
cap-notifyand nothing seems to have happened there. There was only weird sounding suggestion to make ZNC just disconnect clients when it's not connected to server (https://github.com/weechat/weechat/issues/182#issuecomment-53982865).We were just discussing about this at #znc at freenode and noticed that I have very high amount of traffic which I think is mostly caused by
WHO. Another person pasted their traffic which was 2GiB in one week.cap-notifymight not even be required for a prototype implementation... I think sending an unsolicited CAP LS would cause most existing clients to react in the expected way and request newly available caps.(Edit: Thinking about it a bit more, I'm actually quite surprised it works at all.)
@grawity
Using unsolicited CAP LS works at least for HexChat, and I've an away_notify_unsolicited module which uses that method here now.
I have been testing away_notify since https://github.com/znc/znc/issues/315#issuecomment-56202498 and here are my current uptime and traffic.
As you can see, traffic has decreased a lot.
Maybe such usage of
CAP LSworks with some clients, but certainly not for every client.The unsolicited
CAP LSworked with HexChat, but was tested and shown not to work with weechat. It is not an acceptable solution at this point.👍 Just put 10$ on this!
@NuclearW said:
cap-notifydoes not solve this problem. All capabilities are listed inCAP LS, and the spec says you should useCAP LSfor discovery. Whatever weechat's problem is, it's not to do withCAP LS.In other words why wouldn't the client know it's connecting to a network that supports
away-notify. Is this some weird bouncer quirk? Can someone explain it?Nevermind it's about offering the capabilities to clients. I get it now.