Don't send 333 to client if topic owner is unknown

Fix #1889
This commit is contained in:
Alexey Sokolov
2024-02-05 22:44:42 +00:00
parent 1580f42997
commit eb607b9736
+7 -5
View File
@@ -156,11 +156,13 @@ void CChan::AttachUser(CClient* pClient) {
m_pNetwork->GetIRCNick().GetNick() + " " +
GetName() + " :" + GetTopic(),
pClient);
m_pNetwork->PutUser(":" + m_pNetwork->GetIRCServer() + " 333 " +
m_pNetwork->GetIRCNick().GetNick() + " " +
GetName() + " " + GetTopicOwner() + " " +
CString(GetTopicDate()),
pClient);
if (!GetTopicOwner().empty()) {
m_pNetwork->PutUser(":" + m_pNetwork->GetIRCServer() + " 333 " +
m_pNetwork->GetIRCNick().GetNick() + " " +
GetName() + " " + GetTopicOwner() + " " +
CString(GetTopicDate()),
pClient);
}
}
CString sPre = ":" + m_pNetwork->GetIRCServer() + " 353 " +