diff options
author | Sadie Powell <sadie@witchery.services> | 2020-03-19 07:34:04 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-03-19 07:34:33 +0000 |
commit | c0703f66d7ef9b771bad41e5c207915b42c6497a (patch) | |
tree | c1da8719abbcee0077422c8a74ff5f103fc585b0 | |
parent | 92d83e91038eb54a8200815d5d948c2b61dacce4 (diff) |
Add a raw source/target PRIVMSG overload for sending a status msg.
-rw-r--r-- | include/clientprotocolmsg.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/clientprotocolmsg.h b/include/clientprotocolmsg.h index 559d273f9..0dbac1396 100644 --- a/include/clientprotocolmsg.h +++ b/include/clientprotocolmsg.h @@ -489,10 +489,19 @@ class ClientProtocol::Messages::Privmsg : public ClientProtocol::Message * @param text Privmsg text, will be copied. * @param mt Message type. */ - Privmsg(const std::string& source, const std::string& target, const std::string& text, MessageType mt = MSG_PRIVMSG) + Privmsg(const std::string& source, const std::string& target, const std::string& text, MessageType mt = MSG_PRIVMSG, char status = 0) : ClientProtocol::Message(CommandStrFromMsgType(mt), source) { - PushParam(target); + if (status) + { + std::string rawtarget(1, status); + rawtarget.append(target); + PushParam(rawtarget); + } + else + { + PushParam(target); + } PushParam(text); } |