From 46f6342c5c1b70e5926a3dfc49d2c00eb0b39563 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 11 Apr 2014 15:06:44 +0200 Subject: m_filter Use case insensitive compare for exempted targets, add typedef for the set --- src/modules/m_filter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/modules') 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 ExemptTargetSet; + bool initing; RegexFactory* factory; void FreeFilters(); @@ -167,7 +169,8 @@ class ModuleFilter : public Module std::vector filters; int flags; - std::set 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::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)); } -- cgit v1.2.3