Skip to content
Permalink
Browse files Browse the repository at this point in the history
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
DarthGandalf committed Dec 31, 2011
1 parent a3b9d8b commit 11508aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/bouncedcc.cpp
Expand Up @@ -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")) {
Expand All @@ -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");
}
}
}
Expand Down

0 comments on commit 11508aa

Please sign in to comment.