diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-08-31 12:44:57 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-08-31 12:44:57 +0200 |
commit | c9092344a5e6245a72dd4f16205ea8d788053a90 (patch) | |
tree | 46dc7695449fd19caafb5f75ab5991285dd4f5e3 /src | |
parent | d990692296594fe9cf0dfd2176182e4bbc404fe3 (diff) |
m_blockamsg Prevent double copy of the target string
Diffstat (limited to 'src')
-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 6bfacdfb8..77607fc20 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -40,8 +40,8 @@ class BlockedMessage irc::string target; time_t sent; - BlockedMessage(const std::string &msg, const irc::string &tgt, time_t when) - : message(msg), target(tgt), sent(when) + BlockedMessage(const std::string& msg, const std::string& tgt, time_t when) + : message(msg), target(tgt.c_str()), sent(when) { } }; @@ -144,7 +144,7 @@ class ModuleBlockAmsg : public Module } else { - m = new BlockedMessage(parameters[1], parameters[0].c_str(), ServerInstance->Time()); + m = new BlockedMessage(parameters[1], parameters[0], ServerInstance->Time()); blockamsg.set(user, m); } } |