mirror of
https://github.com/znc/znc.git
synced 2026-06-23 11:32:06 +02:00
Move ChangeDir() and MakeDir() from CUtils to CDir
Those function were not modified. Only change is the name. Those *Dir() functions really made no sense in CUtils when there is FileUtils stuff. They really fit much better into here. I'll bet they'll make new friends fast. I mean, why shouldn't they? Uhm... sorry ;) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1044 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+4
-4
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
virtual void OnModCommand(const CString& sCommand) {
|
||||
if ((strcasecmp(sCommand.c_str(), "cd") == 0) || (strncasecmp(sCommand.c_str(), "cd ", 3) == 0)) {
|
||||
CString sPath = CUtils::ChangeDir(m_sPath, ((sCommand.length() == 2) ? CString(CZNC::Get().GetHomePath()) : CString(sCommand.substr(3))), CZNC::Get().GetHomePath());
|
||||
CString sPath = CDir::ChangeDir(m_sPath, ((sCommand.length() == 2) ? CString(CZNC::Get().GetHomePath()) : CString(sCommand.substr(3))), CZNC::Get().GetHomePath());
|
||||
CFile Dir(sPath);
|
||||
|
||||
if (Dir.IsDir()) {
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
if ((sToNick.empty()) || (sFile.empty())) {
|
||||
PutShell("usage: Send <nick> <file>");
|
||||
} else {
|
||||
sFile = CUtils::ChangeDir(m_sPath, sFile, CZNC::Get().GetHomePath());
|
||||
sFile = CDir::ChangeDir(m_sPath, sFile, CZNC::Get().GetHomePath());
|
||||
|
||||
if (!CFile::Exists(sFile)) {
|
||||
PutShell("get: no such file [" + sFile + "]");
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
if (sFile.empty()) {
|
||||
PutShell("usage: Get <file>");
|
||||
} else {
|
||||
sFile = CUtils::ChangeDir(m_sPath, sFile, CZNC::Get().GetHomePath());
|
||||
sFile = CDir::ChangeDir(m_sPath, sFile, CZNC::Get().GetHomePath());
|
||||
|
||||
if (!CFile::Exists(sFile)) {
|
||||
PutShell("get: no such file [" + sFile + "]");
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
|
||||
virtual EModRet OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize) {
|
||||
if (strcasecmp(RemoteNick.GetNick().c_str(), CString(GetModNick()).c_str()) == 0) {
|
||||
CString sLocalFile = CUtils::ChangeDir(m_sPath, sFile, CZNC::Get().GetHomePath());
|
||||
CString sLocalFile = CDir::ChangeDir(m_sPath, sFile, CZNC::Get().GetHomePath());
|
||||
|
||||
m_pUser->GetFile(m_pUser->GetCurNick(), CUtils::GetIP(uLongIP), uPort, sLocalFile, uFileSize, GetModName());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user