summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_filter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index a9ea3ba5e..03ed814bc 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -47,7 +47,14 @@ class ModuleFilter : public FilterBase
{
if ((ServerInstance->MatchText(text2,index->first)) || (ServerInstance->MatchText(text,index->first)))
{
- return index->second;
+ FilterResult* fr = index->second;
+ if (index != filters.begin())
+ {
+ std::string pat = index->first;
+ filters.erase(fr);
+ filters.insert(filters.begin(), std::make_pair(pat,fr));
+ }
+ return fr;
}
}
return NULL;