Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #540 from kobuki/dcc-filename-fix

Receiving DCC transfers fail with certain iroffer daemons
  • Loading branch information...
commit 160218ac85c406db9e2ade1ab985f567f1b44fe3 2 parents 3b01efc + 5d13cd9
@DarthGandalf DarthGandalf authored
Showing with 10 additions and 10 deletions.
  1. +10 −10 modules/bouncedcc.cpp
View
20 modules/bouncedcc.cpp
@@ -160,11 +160,11 @@ class CBounceDCCMod : public CModule {
virtual EModRet OnUserCTCP(CString& sTarget, CString& sMessage) {
if (sMessage.Equals("DCC ", false, 4)) {
- CString sType = sMessage.Token(1);
- CString sFile = sMessage.Token(2);
- unsigned long uLongIP = sMessage.Token(3).ToULong();
- unsigned short uPort = sMessage.Token(4).ToUShort();
- unsigned long uFileSize = sMessage.Token(5).ToULong();
+ CString sType = sMessage.Token(1, false, " ", false, "\"", "\"", true);
+ CString sFile = sMessage.Token(2, false, " ", false, "\"", "\"", false);
+ unsigned long uLongIP = sMessage.Token(3, false, " ", false, "\"", "\"", true).ToULong();
+ unsigned short uPort = sMessage.Token(4, false, " ", false, "\"", "\"", true).ToUShort();
+ unsigned long uFileSize = sMessage.Token(5, false, " ", false, "\"", "\"", true).ToULong();
CString sIP = GetLocalDCCIP();
if (!UseClientIP()) {
@@ -215,11 +215,11 @@ class CBounceDCCMod : public CModule {
virtual EModRet OnPrivCTCP(CNick& Nick, CString& sMessage) {
if (sMessage.Equals("DCC ", false, 4) && m_pNetwork->IsUserAttached()) {
// DCC CHAT chat 2453612361 44592
- CString sType = sMessage.Token(1);
- CString sFile = sMessage.Token(2);
- unsigned long uLongIP = sMessage.Token(3).ToULong();
- unsigned short uPort = sMessage.Token(4).ToUShort();
- unsigned long uFileSize = sMessage.Token(5).ToULong();
+ CString sType = sMessage.Token(1, false, " ", false, "\"", "\"", true);
+ CString sFile = sMessage.Token(2, false, " ", false, "\"", "\"", false);
+ unsigned long uLongIP = sMessage.Token(3, false, " ", false, "\"", "\"", true).ToULong();
+ unsigned short uPort = sMessage.Token(4, false, " ", false, "\"", "\"", true).ToUShort();
+ unsigned long uFileSize = sMessage.Token(5, false, " ", false, "\"", "\"", true).ToULong();
if (sType.Equals("CHAT")) {
CNick FromNick(Nick.GetNickMask());
Please sign in to comment.
Something went wrong with that request. Please try again.