diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-04-11 15:16:26 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-04-11 15:16:26 +0200 |
commit | 477811faefa0a5b4e7d824eaae7a755bb0cf9517 (patch) | |
tree | eb9ea145833138d85ea3edc6912bd5935146b19a /src/modules | |
parent | 07c783c8b043f482b86912b816fdd9db3c41539c (diff) |
m_filter Rename config key used in exemptfromfilter from "channel" to "target", but keep compatibility
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_filter.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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"); |