From 69d39e088765b39b21094ea57e298ef9b429a20e Mon Sep 17 00:00:00 2001 From: om Date: Fri, 7 Apr 2006 11:51:03 +0000 Subject: 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 --- src/inspircd_io.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/inspircd_io.cpp') 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; -- cgit v1.2.3