aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Attila Molnar2014-04-11 15:16:26 +0200
committerGravatar Attila Molnar2014-04-11 15:16:26 +0200
commit477811faefa0a5b4e7d824eaae7a755bb0cf9517 (patch)
treeeb9ea145833138d85ea3edc6912bd5935146b19a /src
parentm_filter Rename exemptfromfilter field to exemptedchans, use std::set::count() (diff)
downloadinspircd++-477811faefa0a5b4e7d824eaae7a755bb0cf9517.tar.gz
inspircd++-477811faefa0a5b4e7d824eaae7a755bb0cf9517.tar.bz2
inspircd++-477811faefa0a5b4e7d824eaae7a755bb0cf9517.zip
m_filter Rename config key used in exemptfromfilter from "channel" to "target", but keep compatibility
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_filter.cpp9
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");