diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-20 09:23:57 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-20 09:23:57 +0000 |
commit | 4f78f5157f2a1db67628a922b0320f3162c12d87 (patch) | |
tree | 0d9340507c4185726bfa712357ba6a3271c25e03 /src/modules.cpp | |
parent | 140bafe54469d7d7f97ffd77d44ce105ae2c6c52 (diff) |
ConfigReader fixes to cope with tab characters (why didnt we notice this before?)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@680 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r-- | src/modules.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index c042a8fed..ca3c2e423 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -355,9 +355,15 @@ ConfigReader::ConfigReader(std::string filename) std::string ConfigReader::ReadValue(std::string tag, std::string name, int index) { + log(DEBUG,"ConfigReader::ReadValue '%s' '%s' %d",tag.c_str(),name.c_str(),index); char val[MAXBUF]; - ReadConf(cache,tag.c_str(),name.c_str(),index,val); - return val; + char t[MAXBUF]; + char n[MAXBUF]; + strncpy(t,tag.c_str(),MAXBUF); + strncpy(n,name.c_str(),MAXBUF); + ReadConf(cache,t,n,index,val); + log(DEBUG,"ConfigReader::ReadValue read '%s'",val); + return std::string(val); } |