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 -->
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 -->
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.
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 fornick2properly, leading to an inconsistent state when reconnecting a client to ZNC. After running /NAMES manually, the prefixes show correctly.ZNC version?
Occurs on both 1.7.1 and 1.7.2
can confirm that this happens, I am having the same issue.
The issue appears to be affecting RPL_CHANNELMODEIS as well, leading to channel modes appearing as
+:ntHeh.
CMessage::Parsehandles this correctly. However, it remembers that there was a colon (setsm_bColon = true). Thus,CModeMessage::GetModes()callingGetParamsColon(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 aVCStringinstead of aCStringthat needs to be parsed again. Similarly, all other uses ofGetParamsColon()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.cppright now, sorry).Any progress on a fix for this?
No.
@linuxdaemon as soon as you write a patch for this :)