From 867e74a2acb7bbb21b5d508fc37538e44d8c1848 Mon Sep 17 00:00:00 2001 From: ChrisTX Date: Thu, 9 Aug 2012 00:03:33 +0200 Subject: configreader: Replace ConfValue here with a ConfigTagList enumeration, as it isn't guaranteed that bind or link tags are unique which causes Issue #270 Original commit edited by @attilamolnar - fixed wrong line being displayed in generated messages - removed redundant ServerInstance->Config before ConfTags --- src/configreader.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/configreader.cpp b/src/configreader.cpp index b8796430b..37742cc9f 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -657,10 +657,14 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) for (int Index = 0; Index * sizeof(Deprecated) < sizeof(ChangedConfig); Index++) { std::string dummy; - if (ConfValue(ChangedConfig[Index].tag)->readString(ChangedConfig[Index].value, dummy, true)) - errstr << "Your configuration contains a deprecated value: <" - << ChangedConfig[Index].tag << ":" << ChangedConfig[Index].value << "> - " << ChangedConfig[Index].reason - << " (at " << ConfValue(ChangedConfig[Index].tag)->getTagLocation() << ")\n"; + ConfigTagList tags = ConfTags(ChangedConfig[Index].tag); + for(ConfigIter i = tags.first; i != tags.second; ++i) + { + if (i->second->readString(ChangedConfig[Index].value, dummy, true)) + errstr << "Your configuration contains a deprecated value: <" + << ChangedConfig[Index].tag << ":" << ChangedConfig[Index].value << "> - " << ChangedConfig[Index].reason + << " (at " << i->second->getTagLocation() << ")\n"; + } } Fill(); -- cgit v1.2.3