From 26e22f0cad4ab6bc2f7fc3464d283d95d458909a Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 14 Apr 2007 11:33:59 +0000 Subject: Some tweaks suggested by pingbad, dont use yet :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6791 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_filter.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/modules') 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; -- cgit v1.2.3