Channel prefixes not updating on mode change InspIRCd v3 #897

Closed
opened 2026-10-05 04:51:26 +02:00 by adam · 8 comments
Owner

In InspIRCd, the mode change message may appear in the form MODE #channel +ooo nick nick1 :nick2, which is valid according to RFC1459, but ZNC does not seem to update the channel prefix for nick2 properly, leading to an inconsistent state when reconnecting a client to ZNC. After running /NAMES manually, the prefixes show correctly.

In InspIRCd, the mode change message may appear in the form `MODE #channel +ooo nick nick1 :nick2`, which is valid according to RFC1459, but ZNC does not seem to update the channel prefix for `nick2` properly, leading to an inconsistent state when reconnecting a client to ZNC. After running /NAMES manually, the prefixes show correctly. <!-- github-sync-id:405000296 -->
adam closed this issue 2026-10-05 04:51:27 +02:00
Author
Owner

ZNC version?

ZNC version? <!-- github-comment-id:459174816 -->
Author
Owner

Occurs on both 1.7.1 and 1.7.2

Occurs on both 1.7.1 and 1.7.2 <!-- github-comment-id:459175041 -->
Author
Owner

can confirm that this happens, I am having the same issue.

can confirm that this happens, I am having the same issue. <!-- github-comment-id:459382518 -->
Author
Owner

The issue appears to be affecting RPL_CHANNELMODEIS as well, leading to channel modes appearing as +:nt

The issue appears to be affecting RPL_CHANNELMODEIS as well, leading to channel modes appearing as `+:nt` <!-- github-comment-id:459970568 -->
Author
Owner

MODE #channel +ooo nick nick1 :nick2

Heh. CMessage::Parse handles this correctly. However, it remembers that there was a colon (sets m_bColon = true). Thus, CModeMessage::GetModes() calling GetParamsColon(1) reconstructs the argument correctly to contain :nick2.

It is kind of pointless to first parse the message and then to stitch it together into a single string only to parse that again. I'd suggest an API change, making CModeMessage::GetModes() return a VCString instead of a CString that needs to be parsed again. Similarly, all other uses of GetParamsColon() should be reviewed by someone.

From a quick look, there do not seem to be many calls. We seem to have hit all important ones on the receiving side already (and I'm too lazy to look at modules and src/Client.cpp right now, sorry).

> MODE #channel +ooo nick nick1 :nick2 Heh. `CMessage::Parse` handles this correctly. However, it remembers that there was a colon (sets `m_bColon = true`). Thus, `CModeMessage::GetModes()` calling `GetParamsColon(1)` reconstructs the argument correctly to contain `:nick2`. It is kind of pointless to first parse the message and then to stitch it together into a single string only to parse that again. I'd suggest an API change, making `CModeMessage::GetModes()` return a `VCString` instead of a `CString` that needs to be parsed again. Similarly, all other uses of `GetParamsColon()` should be reviewed by someone. From a quick look, there do not seem to be many calls. We seem to have hit all important ones on the receiving side already (and I'm too lazy to look at modules and `src/Client.cpp` right now, sorry). <!-- github-comment-id:461409543 -->
Author
Owner

Any progress on a fix for this?

Any progress on a fix for this? <!-- github-comment-id:494667052 -->
Author
Owner

No.

No. <!-- github-comment-id:494884030 -->
Author
Owner

@linuxdaemon as soon as you write a patch for this :)

@linuxdaemon as soon as you write a patch for this :) <!-- github-comment-id:494889815 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#897