summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-04-11 15:06:44 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-04-11 15:06:44 +0200
commit46f6342c5c1b70e5926a3dfc49d2c00eb0b39563 (patch)
treee62fa32d5d3650a913df62cebda6eaa42d1b1bb9 /src/modules
parent9ca7437e8faa192d26e1170e5825318ea0088be2 (diff)
m_filter Use case insensitive compare for exempted targets, add typedef for the set
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_filter.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index 47041f824..6d19d68ef 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -156,6 +156,8 @@ class CommandFilter : public Command
class ModuleFilter : public Module
{
+ typedef std::set<std::string, irc::insensitive_swo> ExemptTargetSet;
+
bool initing;
RegexFactory* factory;
void FreeFilters();
@@ -167,7 +169,8 @@ class ModuleFilter : public Module
std::vector<FilterResult> filters;
int flags;
- std::set<std::string> exemptfromfilter; // List of channel names excluded from filtering.
+ // List of channel names excluded from filtering.
+ ExemptTargetSet exemptfromfilter;
ModuleFilter();
CullResult cull();
@@ -681,7 +684,7 @@ ModResult ModuleFilter::OnStats(char symbol, User* user, string_list &results)
{
results.push_back("223 "+user->nick+" :"+RegexEngine.GetProvider()+":"+i->freeform+" "+i->GetFlags()+" "+FilterActionToString(i->action)+" "+ConvToStr(i->gline_time)+" :"+i->reason);
}
- for (std::set<std::string>::iterator i = exemptfromfilter.begin(); i != exemptfromfilter.end(); ++i)
+ for (ExemptTargetSet::const_iterator i = exemptfromfilter.begin(); i != exemptfromfilter.end(); ++i)
{
results.push_back("223 "+user->nick+" :EXEMPT "+(*i));
}