aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_blockamsg.cpp
diff options
context:
space:
mode:
authorGravatar Dominic Hamon2021-05-30 20:37:54 +0100
committerGravatar GitHub2021-05-30 20:37:54 +0100
commit02340285c564a7e82105137192d46d554a6fce3a (patch)
tree696d1a6249841de62c3fed70310c2a347fc66732 /src/modules/m_blockamsg.cpp
parentAdd a workaround for a bug in GitHub Actions. (diff)
Added -Wshorten-64-to-32 and fixed all warnings.
Diffstat (limited to 'src/modules/m_blockamsg.cpp')
-rw-r--r--src/modules/m_blockamsg.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index f76f211bc..e71c5c80d 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -50,7 +50,7 @@ class BlockedMessage
class ModuleBlockAmsg : public Module
{
- unsigned int ForgetDelay;
+ unsigned long ForgetDelay;
BlockAction action;
SimpleExtItem<BlockedMessage> blockamsg;
@@ -109,7 +109,11 @@ 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]) && (!irc::equals(m->target, parameters[0])) && ForgetDelay && (m->sent >= ServerInstance->Time()-ForgetDelay)) || ((targets > 1) && (targets == user->chans.size())))
+ if ((m && (m->message == parameters[1]) &&
+ (!irc::equals(m->target, parameters[0])) &&
+ ForgetDelay &&
+ (m->sent >= ServerInstance->Time()-(long)ForgetDelay)) ||
+ ((targets > 1) && (targets == user->chans.size())))
{
// Block it...
if (action == IBLOCK_KILLOPERS || action == IBLOCK_NOTICEOPERS)