]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add a raw source/target PRIVMSG overload for sending a status msg.
authorSadie Powell <sadie@witchery.services>
Thu, 19 Mar 2020 07:34:04 +0000 (07:34 +0000)
committerSadie Powell <sadie@witchery.services>
Thu, 19 Mar 2020 07:34:33 +0000 (07:34 +0000)
include/clientprotocolmsg.h

index 559d273f9e97c622684edfba9da462baabc91769..0dbac1396f8125e486740c14285e4c3050152ec5 100644 (file)
@@ -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);
        }