mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Rework MODE/RPL_CHANMODEIS handling for trailing args (#1661)
Some servers may send a colon even if the last parameter doesn't need it, currently this leads to issues with permission/mode tracking, as the core doesn't handle the colon properly. This fix replaces reconstructing the parameter string with just passing a vector of the relevant parameters to CChan::SetModes() and adds overrides for CChan::SetModes() and CChan::ModeChange() that accept the vector instead. Clean up uses of old CModeMessage::GetModes()
This commit is contained in:
committed by
Alexey Sokolov
parent
51e82fc7e8
commit
95369455fc
@@ -1086,9 +1086,8 @@ bool CClient::OnJoinMessage(CJoinMessage& Message) {
|
||||
|
||||
bool CClient::OnModeMessage(CModeMessage& Message) {
|
||||
CString sTarget = Message.GetTarget();
|
||||
CString sModes = Message.GetModes();
|
||||
|
||||
if (m_pNetwork && m_pNetwork->IsChan(sTarget) && sModes.empty()) {
|
||||
if (m_pNetwork && m_pNetwork->IsChan(sTarget) && !Message.HasModes()) {
|
||||
// If we are on that channel and already received a
|
||||
// /mode reply from the server, we can answer this
|
||||
// request ourself.
|
||||
|
||||
Reference in New Issue
Block a user