diff options
| author | 2018-04-14 14:59:35 +0100 | |
|---|---|---|
| committer | 2018-04-16 15:24:49 +0100 | |
| commit | 2d36fcb16ef3209fffbe9f4b600971a1edd2ae4b (patch) | |
| tree | 4e8f371548bfbc844ad7db42b775db847b141636 /src/modules/m_blockamsg.cpp | |
| parent | Extract ConfigTag::getInt magnitude logic to a function template. (diff) | |
Convert ConfigTag::getDuration to return an unsigned long.
Diffstat (limited to 'src/modules/m_blockamsg.cpp')
| -rw-r--r-- | src/modules/m_blockamsg.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index 7d97069f5..ed0e486e9 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -48,7 +48,7 @@ class BlockedMessage class ModuleBlockAmsg : public Module { - int ForgetDelay; + unsigned int ForgetDelay; BlockAction action; SimpleExtItem<BlockedMessage> blockamsg; @@ -66,7 +66,7 @@ class ModuleBlockAmsg : public Module void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { ConfigTag* tag = ServerInstance->Config->ConfValue("blockamsg"); - ForgetDelay = tag->getDuration("delay", -1); + ForgetDelay = tag->getDuration("delay", 3); std::string act = tag->getString("action"); if (act == "notice") @@ -116,7 +116,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]) && (!irc::equals(m->target, parameters[0])) && (ForgetDelay != -1) && (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()-ForgetDelay)) || ((targets > 1) && (targets == user->chans.size()))) { // Block it... if (action == IBLOCK_KILLOPERS || action == IBLOCK_NOTICEOPERS) |
