summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-10-19 19:19:46 +0200
committerattilamolnar <attilamolnar@hush.com>2012-10-19 19:22:03 +0200
commit330bbfe0a74973b99070d407aaf967638318c950 (patch)
treeb32e892ac9b99a0fbe7d0f5f9c2bdb7f840adc98 /src
parent96917a414a4dafb8b17ef9fe7b9e22537e6e0c93 (diff)
m_filter Don't move the filter to the beginning of the vector when a match occurs
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_filter.cpp9
1 files changed, 1 insertions, 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");
}