diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-08 13:06:19 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-08 13:06:19 +0000 |
commit | f3017195549d748d2373ec51a6c798a6e3a61d00 (patch) | |
tree | 4c76dd80d563ebfa18effe374571d6a2878d5f03 | |
parent | 10f9b491f4b2e8c05653aa2802ea5f06ff641d96 (diff) |
Added optional module path to the configuration file
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1011 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/inspircd.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c0cebd522..141e56679 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -191,6 +191,7 @@ char MyExecutable[1024]; int boundPortCount = 0; int portCount = 0, UDPportCount = 0, ports[MAXSOCKS]; int defaultRoute = 0; +char ModPath[MAXBUF]; connection C; @@ -375,6 +376,7 @@ void ReadConfig(bool bail, userrec* user) ConfValue("options","allowfounder",0,AF,&config_f); ConfValue("dns","server",0,DNSServer,&config_f); ConfValue("dns","timeout",0,DNT,&config_f); + ConfValue("options","moduledir",0,ModPath,&config_f); NetBufferSize = atoi(NB); MaxWhoResults = atoi(MW); dns_timeout = atoi(DNT); @@ -382,6 +384,8 @@ void ReadConfig(bool bail, userrec* user) dns_timeout = 5; if (!strcmp(DNSServer,"")) strlcpy(DNSServer,"127.0.0.1",MAXBUF); + if (!strcmp(ModPath,"")) + strlcpy(ModPath,MOD_PATH,MAXBUF); AllowHalfop = ((!strcasecmp(AH,"true")) || (!strcasecmp(AH,"1")) || (!strcasecmp(AH,"yes"))); AllowProtect = ((!strcasecmp(AP,"true")) || (!strcasecmp(AP,"1")) || (!strcasecmp(AP,"yes"))); AllowFounder = ((!strcasecmp(AF,"true")) || (!strcasecmp(AF,"1")) || (!strcasecmp(AF,"yes"))); @@ -3445,7 +3449,7 @@ bool DirValid(char* dirandfile) bool LoadModule(const char* filename) { char modfile[MAXBUF]; - snprintf(modfile,MAXBUF,"%s/%s",MOD_PATH,filename); + snprintf(modfile,MAXBUF,"%s/%s",ModPath,filename); if (!DirValid(modfile)) { log(DEFAULT,"Module %s is not within the modules directory.",modfile); |