summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorChrisTX <chris@rev-crew.info>2012-08-09 00:03:33 +0200
committerattilamolnar <attilamolnar@hush.com>2012-09-13 16:53:36 +0200
commit867e74a2acb7bbb21b5d508fc37538e44d8c1848 (patch)
tree7ca28aa5d509c014c09dae9bbef24bcbb8e6462e /src/configreader.cpp
parente67dff32ced4be1ec0a8539c29fd44bee9077923 (diff)
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
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp12
1 files 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();