Make CHGHOST work with detached channels

This commit is contained in:
Alexey Sokolov
2024-10-15 17:16:32 +01:00
parent b536d0f3c3
commit 20c540af7d
2 changed files with 12 additions and 2 deletions
+3 -2
View File
@@ -536,8 +536,6 @@ bool CIRCSock::OnChgHostMessage(CChgHostMessage& Message) {
}
}
if (!bNeedEmulate) return true;
CNick NewNick = Message.GetNick();
NewNick.SetIdent(Message.GetNewIdent());
NewNick.SetHost(Message.GetNewHost());
@@ -548,6 +546,9 @@ bool CIRCSock::OnChgHostMessage(CChgHostMessage& Message) {
pNick->SetHost(Message.GetNewHost());
}
if (!bNeedEmulate) continue;
if (pChan->IsDetached()) continue;
CTargetMessage ModeMsg;
ModeMsg.SetNick(CNick(":irc.znc.in"));
ModeMsg.SetTags(Message.GetTags());