Browse files

Fix crash in bouncedcc module.

It happens when DCC RESUME is received.
Affected ZNC versions: 0.200, 0.202.

Thanks to howeyc for reporting this and providing the patch.
  • Loading branch information...
1 parent a3b9d8b commit 11508aa72efab4fad0dbd8292b9614d9371b20a9 @DarthGandalf DarthGandalf committed Dec 31, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 modules/bouncedcc.cpp
View
4 modules/bouncedcc.cpp
@@ -238,7 +238,7 @@ class CBounceDCCMod : public CModule {
CDCCBounce* pSock = (CDCCBounce*) *it;
if (pSock->GetLocalPort() == uResumePort) {
- m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pClient->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetUserPort()) + " " + sMessage.Token(4) + "\001");
+ m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pUser->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetUserPort()) + " " + sMessage.Token(4) + "\001");
}
}
} else if (sType.Equals("ACCEPT")) {
@@ -248,7 +248,7 @@ class CBounceDCCMod : public CModule {
CDCCBounce* pSock = (CDCCBounce*) *it;
if (pSock->GetUserPort() == sMessage.Token(3).ToUShort()) {
- m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pClient->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetLocalPort()) + " " + sMessage.Token(4) + "\001");
+ m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pUser->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetLocalPort()) + " " + sMessage.Token(4) + "\001");
}
}
}

0 comments on commit 11508aa

Please sign in to comment.