diff options
| author | 2014-12-28 22:56:07 +0000 | |
|---|---|---|
| committer | 2014-12-28 22:56:07 +0000 | |
| commit | 60e00ddd6e77a43e95a161168f1727ebcbe0f610 (patch) | |
| tree | 0db9802a519380698d1d4941300843581e9cdf5b /src/modules/dcc/DccBroker.cpp | |
| parent | Merge patch by TheReign (diff) | |
| download | KVIrc-60e00ddd6e77a43e95a161168f1727ebcbe0f610.tar.gz KVIrc-60e00ddd6e77a43e95a161168f1727ebcbe0f610.tar.bz2 KVIrc-60e00ddd6e77a43e95a161168f1727ebcbe0f610.zip | |
Merge patch by TheReign
* Fixes most of the bugs in DCC send support for files larger than 4GiB. I doubt I found them all, but it catches all of the ones I needed for myself.
* NOTE: I confess I probably didn't choose the best solution for this, but it seems to do what is needed.
* NOTE: The better solution may be to add 64-bit number support to sendFmtData()
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6415 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/dcc/DccBroker.cpp')
| -rw-r--r-- | src/modules/dcc/DccBroker.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/dcc/DccBroker.cpp b/src/modules/dcc/DccBroker.cpp index 3e6ccb1f5..acd1dfb8c 100644 --- a/src/modules/dcc/DccBroker.cpp +++ b/src/modules/dcc/DccBroker.cpp @@ -227,21 +227,22 @@ void DccBroker::rsendExecute(DccDescriptor * dcc) szTag = t->m_szTag; // DCC [ST]SEND <filename> <fakeipaddress> <zero-port> <filesize> <sessionid> - dcc->console()->connection()->sendFmtData("PRIVMSG %s :%cDCC %s %s 127.0.0.1 0 %u %s%c", + dcc->console()->connection()->sendFmtData("PRIVMSG %s :%cDCC %s %s 127.0.0.1 0 %s %s%c", dcc->console()->connection()->encodeText(dcc->szNick).data(), 0x01, dcc->console()->connection()->encodeText(dcc->szType).data(), dcc->console()->connection()->encodeText(fName).data(), - fi.size(), + dcc->console()->connection()->encodeText(QString::number(fi.size())).data(), dcc->console()->connection()->encodeText(szTag).data(), 0x01); } else { - dcc->console()->connection()->sendFmtData("PRIVMSG %s :%cDCC %s %s %u%c", + dcc->console()->connection()->sendFmtData("PRIVMSG %s :%cDCC %s %s %s%c", dcc->console()->connection()->encodeText(dcc->szNick).data(), 0x01, dcc->console()->connection()->encodeText(dcc->szType).data(), dcc->console()->connection()->encodeText(fName).data(), - fi.size(),0x01); + dcc->console()->connection()->encodeText(QString::number(fi.size())).data(), + 0x01); szTag = dcc->szFileName; } @@ -970,12 +971,12 @@ bool DccBroker::handleResumeRequest(KviDccRequest * dcc,const char * filename,co KviIrcServerParser::encodeCtcpParameter(filename,szBuffy); dcc->ctcpMsg->msg->console()->connection()->sendFmtData( - "PRIVMSG %s :%cDCC ACCEPT %s %s %u %s%c", + "PRIVMSG %s :%cDCC ACCEPT %s %s %s %s%c", dcc->ctcpMsg->msg->console()->connection()->encodeText(dcc->ctcpMsg->pSource->nick()).data(), 0x01, szBuffy.ptr(), port, - filePos, + dcc->ctcpMsg->msg->console()->connection()->encodeText(QString::number(filePos)).data(), szZeroPortTag, 0x01 ); |
