From 13fcf22eaba873290e0f04484fc75bcd339d4fa3 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 18 Feb 2007 00:50:09 +0000 Subject: Eliminate some string copies, tidy some code, and reverse some short-circuit checks (Expensive(x) && Cheap(y)) -> (Cheap(y) && Expensive(x)) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6591 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_silence_ext.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/modules/m_silence_ext.cpp') diff --git a/src/modules/m_silence_ext.cpp b/src/modules/m_silence_ext.cpp index 122016dbc..5acd9e22d 100644 --- a/src/modules/m_silence_ext.cpp +++ b/src/modules/m_silence_ext.cpp @@ -346,16 +346,8 @@ class ModuleSilence : public Module { for (silencelist::const_iterator c = sl->begin(); c != sl->end(); c++) { - if ((match(source->GetFullHost(), c->first.c_str())) && ( ((c->second & pattern) > 0)) || ((c->second & SILENCE_ALL) > 0)) - { - if (((c->second & SILENCE_EXCLUDE) > 0)) - { - return 0; - } - else { - return 1; - } - } + if (((((c->second & pattern) > 0)) || ((c->second & SILENCE_ALL) > 0)) && (ServerInstance->MatchText(source->GetFullHost(), c->first))) + return !(((c->second & SILENCE_EXCLUDE) > 0)); } } return 0; -- cgit v1.3.1-10-gc9f91