summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp58
-rw-r--r--src/modules.cpp7
2 files changed, 0 insertions, 65 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 0fcf88e9d..51045ef58 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -2046,64 +2046,6 @@ char* ServerConfig::CleanFilename(char* name)
}
-bool ServerConfig::DirValid(const char* dirandfile)
-{
-#ifdef WINDOWS
- return true;
-#else
-
- char work[1024];
- char buffer[1024];
- char otherdir[1024];
- int p;
-
- strlcpy(work, dirandfile, 1024);
- p = strlen(work);
-
- // we just want the dir
- while (*work)
- {
- if (work[p] == '/')
- {
- work[p] = '\0';
- break;
- }
-
- work[p--] = '\0';
- }
-
- // Get the current working directory
- if (getcwd(buffer, 1024 ) == NULL )
- return false;
-
- if (chdir(work) == -1)
- return false;
-
- if (getcwd(otherdir, 1024 ) == NULL )
- return false;
-
- if (chdir(buffer) == -1)
- return false;
-
- size_t t = strlen(work);
-
- if (strlen(otherdir) >= t)
- {
- otherdir[t] = '\0';
- if (!strcmp(otherdir,work))
- {
- return true;
- }
-
- return false;
- }
- else
- {
- return false;
- }
-#endif
-}
-
std::string ServerConfig::GetFullProgDir()
{
char buffer[PATH_MAX];
diff --git a/src/modules.cpp b/src/modules.cpp
index 5d61812c0..71f4d7524 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -397,13 +397,6 @@ bool ModuleManager::Load(const char* filename)
snprintf(modfile,MAXBUF,"%s/%s",Instance->Config->ModPath,filename);
std::string filename_str = filename;
- if (!ServerConfig::DirValid(modfile))
- {
- LastModuleError = "Module " + std::string(filename) + " is not in the module directory that i am configured to look in (is "+Instance->Config->ModPath+" really a symlink?)";
- Instance->Logs->Log("MODULE", DEFAULT, LastModuleError);
- return false;
- }
-
if (!ServerConfig::FileExists(modfile))
{
LastModuleError = "Module file could not be found: " + filename_str;