From 75e19b2ff35d6b42fe83e7200d3675d81e43ecc1 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 20 May 2005 21:52:25 +0000 Subject: *** empty log message *** git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1466 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/inspircd.cpp') 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; } -- cgit v1.3.1-10-gc9f91