summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-20 21:52:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-20 21:52:25 +0000
commit75e19b2ff35d6b42fe83e7200d3675d81e43ecc1 (patch)
tree5ca84d3f8de3da717786520b17bb7e9008043092 /src/inspircd.cpp
parent16bdaa927d2f532dfdc9f81ec25a843ebc99d9ff (diff)
*** empty log message ***
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1466 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 9f5a0e69c..4e6e0f86c 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -2440,17 +2440,25 @@ bool UnloadModule(const char* filename)
bool LoadModule(const char* filename)
{
char modfile[MAXBUF];
+#ifdef STATIC_LINK
+ snprintf(modfile,MAXBUF,"%s",filename);
+#else
snprintf(modfile,MAXBUF,"%s/%s",ModPath,filename);
+#endif
std::string filename_str = filename;
+#ifndef STATIC_LINK
if (!DirValid(modfile))
{
log(DEFAULT,"Module %s is not within the modules directory.",modfile);
snprintf(MODERR,MAXBUF,"Module %s is not within the modules directory.",modfile);
return false;
}
+#endif
log(DEBUG,"Loading module: %s",modfile);
+#ifndef STATIC_LINK
if (FileExists(modfile))
{
+#endif
for (int j = 0; j < module_names.size(); j++)
{
if (module_names[j] == filename_str)
@@ -2483,6 +2491,7 @@ bool LoadModule(const char* filename)
snprintf(MODERR,MAXBUF,"Factory function failed!");
return false;
}
+#ifndef STATIC_LINK
}
else
{
@@ -2490,6 +2499,7 @@ bool LoadModule(const char* filename)
snprintf(MODERR,MAXBUF,"Module file could not be found");
return false;
}
+#endif
MODCOUNT++;
return true;
}