Use the module save path for dcc's, and remove DLPath since it is no longer used.

This commit is contained in:
Kyle Fuller
2011-05-31 01:39:19 +01:00
parent 16047eaf81
commit c635caeab2
3 changed files with 5 additions and 9 deletions

View File

@@ -89,7 +89,7 @@ public:
#endif
bool SendFile(const CString& sRemoteNick, const CString& sFileName) {
CString sFullPath = CDir::ChangeDir(m_pUser->GetDLPath(), sFileName, CZNC::Get().GetHomePath());
CString sFullPath = CDir::ChangeDir(GetSavePath(), sFileName, CZNC::Get().GetHomePath());
CDCCSock* pSock = new CDCCSock(this, sRemoteNick, sFullPath);
CFile* pFile = pSock->OpenFile(false);
@@ -138,7 +138,7 @@ public:
void SendCommand(const CString& sLine) {
CString sToNick = sLine.Token(1);
CString sFile = sLine.Token(2);
CString sAllowedPath = m_pUser->GetDLPath();
CString sAllowedPath = GetSavePath();
CString sAbsolutePath;
if ((sToNick.empty()) || (sFile.empty())) {
@@ -158,7 +158,7 @@ public:
void GetCommand(const CString& sLine) {
CString sFile = sLine.Token(1);
CString sAllowedPath = m_pUser->GetDLPath();
CString sAllowedPath = GetSavePath();
CString sAbsolutePath;
if (sFile.empty()) {
@@ -234,7 +234,7 @@ public:
}
} else if (sMessage.Equals("DCC SEND ", false, 9)) {
CString sLocalFile = CDir::CheckPathPrefix(m_pUser->GetDLPath(), sMessage.Token(2));
CString sLocalFile = CDir::CheckPathPrefix(GetSavePath(), sMessage.Token(2));
if (sLocalFile.empty()) {
PutModule("Bad DCC file: " + sMessage.Token(2));
}