X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fclientprotocolmsg.h;h=863cdf8b24880e43d352b1f432b4018e1a8226c4;hb=2c9ebe040c113b3bb3717ab8c081c5dbcd3b8350;hp=d2f838d69af3c667e3455dfab111c214121cdb11;hpb=77730fd5f09f8fc193205654c8bba84d34365670;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/clientprotocolmsg.h b/include/clientprotocolmsg.h index d2f838d69..863cdf8b2 100644 --- a/include/clientprotocolmsg.h +++ b/include/clientprotocolmsg.h @@ -1,7 +1,8 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2016 Attila Molnar + * Copyright (C) 2018, 2020 Sadie Powell + * Copyright (C) 2018 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -487,11 +488,21 @@ class ClientProtocol::Messages::Privmsg : public ClientProtocol::Message * @param target Target string. * @param text Privmsg text, will be copied. * @param mt Message type. + * @param status Prefix character for status messages. If non-zero the message is a status message. Optional, defaults to 0. */ - 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); }