From 477811faefa0a5b4e7d824eaae7a755bb0cf9517 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 11 Apr 2014 15:16:26 +0200 Subject: m_filter Rename config key used in exemptfromfilter from "channel" to "target", but keep compatibility --- src/modules/m_filter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index e594160f4..1e9b094f0 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -446,9 +446,12 @@ void ModuleFilter::ReadConfig(ConfigStatus& status) exemptedchans.clear(); for (ConfigIter i = tags.first; i != tags.second; ++i) { - std::string chan = i->second->getString("channel"); - if (!chan.empty()) - exemptedchans.insert(chan); + ConfigTag* tag = i->second; + + // If "target" is not found, try the old "channel" key to keep compatibility with 2.0 configs + const std::string target = tag->getString("target", tag->getString("channel")); + if (!target.empty()) + exemptedchans.insert(target); } std::string newrxengine = ServerInstance->Config->ConfValue("filteropts")->getString("engine"); -- cgit v1.2.3