Watch only when away/detached broken? #381

Closed
opened 2026-10-05 04:16:57 +02:00 by adam · 3 comments
Owner

The watch module gives me no way to only have stuff sent to a separate buffer when I am detached. The code is supposedly there, but I can't find the flags anywhere. The documentation does not have anything on it either. Running on 1.4 stable.

The watch module gives me no way to only have stuff sent to a separate buffer when I am detached. The code is supposedly there, but I can't find the flags anywhere. The documentation does not have anything on it either. Running on 1.4 stable. <!-- github-sync-id:41169039 -->
adam closed this issue 2026-10-05 04:16:58 +02:00
Author
Owner

What you're looking for should be SetDetachedClientOnly or SetDetachedChannelOnly depending on what you meant by detached.

Personally I think I'm going to have to beat up the module a bit so I can filter what gets sent even more, but for now this should be what you're looking for.

For reference, running a 1.6 version from git, I get this Help output:

<nw`> help
<*watch> +------------------------------------------------+-------------------------------------------------------+
<*watch> | Command                                        | Description                                           |
<*watch> +------------------------------------------------+-------------------------------------------------------+
<*watch> | Add <HostMask> [Target] [Pattern]              | Used to add an entry to watch for.                    |
<*watch> | List                                           | List all entries being watched.                       |
<*watch> | Dump                                           | Dump a list of all current entries to be used later.  |
<*watch> | Del <Id>                                       | Deletes Id from the list of watched entries.          |
<*watch> | Clear                                          | Delete all entries.                                   |
<*watch> | Enable <Id | *>                                | Enable a disabled entry.                              |
<*watch> | Disable <Id | *>                               | Disable (but don't delete) an entry.                  |
<*watch> | SetDetachedClientOnly <Id | *> <True | False>  | Enable or disable detached client only for an entry.  |
<*watch> | SetDetachedChannelOnly <Id | *> <True | False> | Enable or disable detached channel only for an entry. |
<*watch> | Buffer [Count]                                 | Show/Set the amount of buffered lines while detached. |
<*watch> | SetSources <Id> [#chan priv #foo* !#bar]       | Set the source channels that you care about.          |
<*watch> | Help                                           | This help.                                            |
<*watch> +------------------------------------------------+-------------------------------------------------------+
What you're looking for should be `SetDetachedClientOnly` or `SetDetachedChannelOnly` depending on what you meant by detached. Personally I think I'm going to have to beat up the module a bit so I can filter what gets sent even more, but for now this should be what you're looking for. For reference, running a 1.6 version from git, I get this `Help` output: ``` <nw`> help <*watch> +------------------------------------------------+-------------------------------------------------------+ <*watch> | Command | Description | <*watch> +------------------------------------------------+-------------------------------------------------------+ <*watch> | Add <HostMask> [Target] [Pattern] | Used to add an entry to watch for. | <*watch> | List | List all entries being watched. | <*watch> | Dump | Dump a list of all current entries to be used later. | <*watch> | Del <Id> | Deletes Id from the list of watched entries. | <*watch> | Clear | Delete all entries. | <*watch> | Enable <Id | *> | Enable a disabled entry. | <*watch> | Disable <Id | *> | Disable (but don't delete) an entry. | <*watch> | SetDetachedClientOnly <Id | *> <True | False> | Enable or disable detached client only for an entry. | <*watch> | SetDetachedChannelOnly <Id | *> <True | False> | Enable or disable detached channel only for an entry. | <*watch> | Buffer [Count] | Show/Set the amount of buffered lines while detached. | <*watch> | SetSources <Id> [#chan priv #foo* !#bar] | Set the source channels that you care about. | <*watch> | Help | This help. | <*watch> +------------------------------------------------+-------------------------------------------------------+ ``` <!-- github-comment-id:53425540 -->
Author
Owner
09:11]  <Fuzzy76>    help
[09:11]  <*watch>    +------------------------------------------+-------------------------------------------------------+
[09:11]  <*watch>    | Command                                  | Description                                           |
[09:11]  <*watch>    +------------------------------------------+-------------------------------------------------------+
[09:11]  <*watch>    | Add <HostMask> [Target] [Pattern]        | Used to add an entry to watch for.                    |
[09:11]  <*watch>    | List                                     | List all entries being watched.                       |
[09:11]  <*watch>    | Dump                                     | Dump a list of all current entries to be used later.  |
[09:11]  <*watch>    | Del <Id>                                 | Deletes Id from the list of watched entries.          |
[09:11]  <*watch>    | Clear                                    | Delete all entries.                                   |
[09:11]  <*watch>    | Enable <Id | *>                          | Enable a disabled entry.                              |
[09:11]  <*watch>    | Disable <Id | *>                         | Disable (but don't delete) an entry.                  |
[09:11]  <*watch>    | Buffer [Count]                           | Show/Set the amount of buffered lines while detached. |
[09:11]  <*watch>    | SetSources <Id> [#chan priv #foo* !#bar] | Set the source channels that you care about.          |
[09:11]  <*watch>    | Help                                     | This help.                                            |
[09:11]  <*watch>    +------------------------------------------+-------------------------------------------------------+
[09:13]  <Fuzzy76>   version
[09:13]  <*status>   ZNC 1.4 - http://znc.in

It is compiled from the release at http://znc.in/releases/archive/znc-1.4.tar.gz

``` 09:11] <Fuzzy76> help [09:11] <*watch> +------------------------------------------+-------------------------------------------------------+ [09:11] <*watch> | Command | Description | [09:11] <*watch> +------------------------------------------+-------------------------------------------------------+ [09:11] <*watch> | Add <HostMask> [Target] [Pattern] | Used to add an entry to watch for. | [09:11] <*watch> | List | List all entries being watched. | [09:11] <*watch> | Dump | Dump a list of all current entries to be used later. | [09:11] <*watch> | Del <Id> | Deletes Id from the list of watched entries. | [09:11] <*watch> | Clear | Delete all entries. | [09:11] <*watch> | Enable <Id | *> | Enable a disabled entry. | [09:11] <*watch> | Disable <Id | *> | Disable (but don't delete) an entry. | [09:11] <*watch> | Buffer [Count] | Show/Set the amount of buffered lines while detached. | [09:11] <*watch> | SetSources <Id> [#chan priv #foo* !#bar] | Set the source channels that you care about. | [09:11] <*watch> | Help | This help. | [09:11] <*watch> +------------------------------------------+-------------------------------------------------------+ ``` ``` [09:13] <Fuzzy76> version [09:13] <*status> ZNC 1.4 - http://znc.in ``` It is compiled from the release at http://znc.in/releases/archive/znc-1.4.tar.gz <!-- github-comment-id:53681408 -->
Author
Owner

Seems this feature was added after 1.4's release.

You'll need to compile a newer version from the repository here to get the new features.

Seems this feature was added [after 1.4's release](https://github.com/znc/znc/commit/88f826ddc4f73d481b0cec089c4af9956f395d5b). You'll need to compile a newer version from the repository here to get the new features. <!-- github-comment-id:53724498 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#381