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
This commit is contained in:
ChrisTX 2012-08-09 00:03:33 +02:00 committed by attilamolnar
parent e67dff32ce
commit 867e74a2ac

View File

@ -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();