mirror of
https://github.com/znc/znc.git
synced 2026-05-03 12:02:30 +02:00
Use the module save path for dcc's, and remove DLPath since it is no longer used.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user