X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_blockamsg.cpp;h=266497b9092b38b5f3f0c1491d82b8ad4e851703;hb=f471083cd0519d47c7c7a09029813ede41994f7b;hp=9614203c350c04a8f3d9f950c9a8085c4d3bb405;hpb=8f5efbc7aa33b792e02d01e3288f553e6e98ccaa;p=user%2Fhenk%2Fcode%2Finspircd.git 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