diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-23 19:37:03 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-23 19:37:03 +0200 |
commit | bcdc3b0bb0ba957a9e99cd6db7f1242a9e587400 (patch) | |
tree | fe0c0962384f5f8aa83658fd5897aa13e29ce22e /src/modules/m_blockamsg.cpp | |
parent | 2df0de3c9212f7ea74fcb9a0ccf20990e47e9f2e (diff) | |
parent | 0aa6c4134011006e6166c72d9c3162b054c01bbe (diff) |
Merge branch 'master+ircstring'
Diffstat (limited to 'src/modules/m_blockamsg.cpp')
-rw-r--r-- | src/modules/m_blockamsg.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index 9614203c3..266497b90 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -37,11 +37,11 @@ class BlockedMessage { public: std::string message; - irc::string target; + std::string target; time_t sent; BlockedMessage(const std::string& msg, const std::string& tgt, time_t when) - : message(msg), target(tgt.c_str()), sent(when) + : message(msg), target(tgt), sent(when) { } }; @@ -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]) && (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 != -1) && (m->sent >= ServerInstance->Time()-ForgetDelay)) || ((targets > 1) && (targets == user->chans.size()))) { // Block it... if (action == IBLOCK_KILLOPERS || action == IBLOCK_NOTICEOPERS) @@ -134,7 +134,7 @@ class ModuleBlockAmsg : public Module { // If there's already a BlockedMessage allocated, use it. m->message = parameters[1]; - m->target = parameters[0].c_str(); + m->target = parameters[0]; m->sent = ServerInstance->Time(); } else |