mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
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:
parent
e67dff32ce
commit
867e74a2ac
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user