summaryrefslogtreecommitdiff
path: root/src/modules/m_blockamsg.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-08-31 12:43:31 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-08-31 12:43:31 +0200
commitd990692296594fe9cf0dfd2176182e4bbc404fe3 (patch)
treefbd143b655a0b3af5f45093ea9ae86ab0fd480af /src/modules/m_blockamsg.cpp
parent84ae29d0eadb5baa7ad4f517c3ce62995205d2f5 (diff)
m_blockamsg Remove useless variable
Diffstat (limited to 'src/modules/m_blockamsg.cpp')
-rw-r--r--src/modules/m_blockamsg.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index 833828233..6bfacdfb8 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -93,7 +93,6 @@ class ModuleBlockAmsg : public Module
// Most messages have a single target so...
int targets = 1;
- int userchans = 0;
if(*parameters[0].c_str() != '#')
{
@@ -114,8 +113,6 @@ class ModuleBlockAmsg : public Module
return MOD_RES_PASSTHRU;
}
- userchans = user->chans.size();
-
// Check that this message wasn't already sent within a few seconds.
BlockedMessage* m = blockamsg.get(user);
@@ -124,7 +121,7 @@ class ModuleBlockAmsg : public Module
// OR
// The number of target channels is equal to the number of channels the sender is on..a little suspicious.
// Check it's more than 1 too, or else users on one channel would have fun.
- if((m && (m->message == parameters[1]) && (m->target != parameters[0]) && (ForgetDelay != -1) && (m->sent >= ServerInstance->Time()-ForgetDelay)) || ((targets > 1) && (targets == userchans)))
+ if ((m && (m->message == parameters[1]) && (m->target != parameters[0]) && (ForgetDelay != -1) && (m->sent >= ServerInstance->Time()-ForgetDelay)) || ((targets > 1) && (targets == user->chans.size())))
{
// Block it...
if(action == IBLOCK_KILLOPERS || action == IBLOCK_NOTICEOPERS)