diff options
| author | 2007-02-18 00:50:09 +0000 | |
|---|---|---|
| committer | 2007-02-18 00:50:09 +0000 | |
| commit | 13fcf22eaba873290e0f04484fc75bcd339d4fa3 (patch) | |
| tree | d977e708f37437aa40914b6cb00dff717e9d8679 /src/modules/m_silence_ext.cpp | |
| parent | Change bytes-used counter for commands (used by /stats m) as in excessive use... (diff) | |
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
Diffstat (limited to 'src/modules/m_silence_ext.cpp')
| -rw-r--r-- | src/modules/m_silence_ext.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
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; |
