From 330bbfe0a74973b99070d407aaf967638318c950 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Fri, 19 Oct 2012 19:19:46 +0200 Subject: m_filter Don't move the filter to the beginning of the vector when a match occurs --- src/modules/m_filter.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 5ce089b63..c5bd5cd47 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -594,14 +594,7 @@ FilterResult* ModuleFilter::FilterMatch(User* user, const std::string &text, int if (index->regex->Matches(filter->flag_strip_color ? stripped_text : text)) { //ServerInstance->Logs->Log("m_filter", DEBUG, "MATCH"); - ImplFilter fr = *index; - if (index != filters.begin()) - { - /* Move to head of list for efficiency */ - filters.erase(index); - filters.insert(filters.begin(), fr); - } - return &*filters.begin(); + return &*index; } //ServerInstance->Logs->Log("m_filter", DEBUG, "NO MATCH"); } -- cgit v1.2.3