summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-26 19:03:16 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-26 19:03:16 +0000
commit69112caf3ae0230ba4538bbbae6d8f0579afd5a4 (patch)
treeada63ddf2bffd8bed9112db261cd024732505732 /src/modules
parent4490e273b1dc62fae144daa3b3cf655156fd1ef0 (diff)
Tidyup, avoid ternary if() on every iteration of a loop (bad brain bad)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5811 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_silence_ext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/m_silence_ext.cpp b/src/modules/m_silence_ext.cpp
index e3f8826e9..4c92b3a47 100644
--- a/src/modules/m_silence_ext.cpp
+++ b/src/modules/m_silence_ext.cpp
@@ -286,6 +286,8 @@ class ModuleSilence : public Module
else if (target_type == TYPE_CHANNEL)
{
chanrec* chan = (chanrec*)dest;
+ int public_silence = (silence_type == SILENCE_PRIVATE ? SILENCE_CHANNEL : SILENCE_CNOTICE);
+
if (chan)
{
CUList *ulist;
@@ -309,7 +311,7 @@ class ModuleSilence : public Module
{
if ((IS_LOCAL(i->second)) && (user != i->second))
{
- if (MatchPattern(i->second, user, silence_type == SILENCE_PRIVATE ? SILENCE_CHANNEL : SILENCE_CNOTICE) == 1)
+ if (MatchPattern(i->second, user, public_silence) == 1)
{
exempt_list[i->second] = i->second;
}