summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-07 11:51:03 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-07 11:51:03 +0000
commit69d39e088765b39b21094ea57e298ef9b429a20e (patch)
tree2c4e0b41a62099e18dd5b01e9232c260cf79ec91 /src
parentd2afbfcf42cb4599f07baea345dcc97a99db3aba (diff)
Same error message somewhere else, and actually define the const char* version of ConfVarEnum so it doesn't just return 1 all the time...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3840 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd_io.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index ed380483a..9753e182e 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -1330,7 +1330,7 @@ int ServerConfig::ConfValueEnum(ConfigDataHash &target, const std::string &tag)
int ServerConfig::ConfVarEnum(ConfigDataHash &target, const char* tag, int index)
{
- return 1;
+ return ConfVarEnum(target, std::string(tag), index);
}
int ServerConfig::ConfVarEnum(ConfigDataHash &target, const std::string &tag, int index)
@@ -1346,9 +1346,13 @@ int ServerConfig::ConfVarEnum(ConfigDataHash &target, const std::string &tag, in
return iter->second.size();
}
+ else if(pos == 0)
+ {
+ log(DEBUG, "No <%s> tags in config file.", tag.c_str());
+ }
else
{
- log(DEBUG, "ConfVarEnum got an out-of-range index %d", pos);
+ log(DEBUG, "ConfVarEnum got an out-of-range index %d, there are only %d occurences of %s", pos, target.count(tag), tag.c_str());
}
return 0;