Watch module matches channel names (and therefore joins/parts) #159

Open
opened 2026-10-05 04:01:49 +02:00 by adam · 1 comment
Owner

If the channel name is matched by a pattern that you add, the Watch module will match this. I'm not sure if this is intended behaviour or not, but it would be nice to have this at least be configurable to ignore these things.

Adding the entry:

[17:05:16] <nick> add * *test *testtest*
[17:05:16] <*watch> Adding entry: [*!*@*] watching for [*testtest*] -> [*test]

Channel activity:

[17:04:53] nick (~nick@host) joined the channel.
[17:05:21] <@nick_> testtest
[17:05:28] nick_ (~nick@host) left the channel.
[17:05:33] nick_ (~nick@host) joined the channel.
[17:05:36] nick_ (~nick@host) left IRC. 
[17:05:41] nick (~nick@host) left the channel. (())

Watch log:

[17:05:21] <*test> <nick_:#testtesttest> testtest
[17:05:28] <*test> * nick_ (~nick@host) parts #testtesttest()
[17:05:32] <*test> * nick_ (~nick@host) joins #testtesttest
[17:05:41] <*test> * nick (~nick@host) parts #testtesttest(())

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2031-watch-module-matches-channel-names-and-therefore-joins-parts?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
If the channel name is matched by a pattern that you add, the Watch module will match this. I'm not sure if this is intended behaviour or not, but it would be nice to have this at least be configurable to ignore these things. Adding the entry: ``` [17:05:16] <nick> add * *test *testtest* [17:05:16] <*watch> Adding entry: [*!*@*] watching for [*testtest*] -> [*test] ``` Channel activity: ``` [17:04:53] nick (~nick@host) joined the channel. [17:05:21] <@nick_> testtest [17:05:28] nick_ (~nick@host) left the channel. [17:05:33] nick_ (~nick@host) joined the channel. [17:05:36] nick_ (~nick@host) left IRC. [17:05:41] nick (~nick@host) left the channel. (()) ``` Watch log: ``` [17:05:21] <*test> <nick_:#testtesttest> testtest [17:05:28] <*test> * nick_ (~nick@host) parts #testtesttest() [17:05:32] <*test> * nick_ (~nick@host) joins #testtesttest [17:05:41] <*test> * nick (~nick@host) parts #testtesttest(()) ``` ## <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2031-watch-module-matches-channel-names-and-therefore-joins-parts?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:7802273 -->
Author
Owner

This also applies to hosts and nicks.
Hosts: My reverse DNS is a domain with my nick, so joins/parts/quits match
Nicks: My lag check script is matching: [11:44:24] <*highlight> -ME- LAGCHK 312468343
That one is easy enough to fix so you don't highlight yourself (return from Process() if Nick == GetCurNick)

The rest I'm not sure what the best way to fix is.. since Process() matches against the whole formatted line, including host and channel names. Possibly change it to take "prefix, message, suffix" rather than the whole formatted line. Though there's probably some specific use cases that'd break, so the watch list would need another flag for whether to match just the message or the whole line.

This also applies to hosts and nicks. Hosts: My reverse DNS is a domain with my nick, so joins/parts/quits match Nicks: My lag check script is matching: [11:44:24] <*highlight> -ME- LAGCHK 312468343 That one is easy enough to fix so you don't highlight yourself (return from Process() if Nick == GetCurNick) The rest I'm not sure what the best way to fix is.. since Process() matches against the whole formatted line, including host and channel names. Possibly change it to take "prefix, message, suffix" rather than the whole formatted line. Though there's probably some specific use cases that'd break, so the watch list would need another flag for whether to match just the message or the whole line. <!-- github-comment-id:92033730 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#159