summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-14 11:33:59 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-14 11:33:59 +0000
commit26e22f0cad4ab6bc2f7fc3464d283d95d458909a (patch)
tree16d64157e86ca428b7910a82e12615558e949159
parent5fdf364a22bf60ab2f4bfa60185eaf85afd28cd5 (diff)
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
-rw-r--r--src/cmd_qline.cpp2
-rw-r--r--src/modules/m_filter.cpp9
2 files changed, 9 insertions, 2 deletions
diff --git a/src/cmd_qline.cpp b/src/cmd_qline.cpp
index 28b6504d6..fdb714b97 100644
--- a/src/cmd_qline.cpp
+++ b/src/cmd_qline.cpp
@@ -51,7 +51,7 @@ CmdResult cmd_qline::Handle (const char** parameters, int pcnt, userrec *user)
{
time_t c_requires_crap = ServerInstance->Duration(parameters[1]) + ServerInstance->Time();
ServerInstance->SNO->WriteToSnoMask('x',"%s added timed Q-line for %s, expires on %s",user->nick,parameters[0],
- ServerInstance->TimeString(&c_requires_crap).c_str());
+ ServerInstance->TimeString(c_requires_crap).c_str());
}
ServerInstance->XLines->apply_lines(to_apply);
}
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;