InspIRCd  3.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ClientProtocol::Messages::Privmsg Class Reference

#include <clientprotocolmsg.h>

Inheritance diagram for ClientProtocol::Messages::Privmsg:
ClientProtocol::Message ClientProtocol::MessageSource

Public Types

enum  NoCopy { nocopy }
 
- Public Types inherited from ClientProtocol::Message
typedef std::vector< ParamParamList
 

Public Member Functions

 Privmsg (User *source, const std::string &target, const std::string &text, MessageType mt=MSG_PRIVMSG)
 
 Privmsg (User *source, const Channel *targetchan, const std::string &text, MessageType mt=MSG_PRIVMSG, char status=0)
 
 Privmsg (User *source, const User *targetuser, 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)
 
 Privmsg (const std::string &source, const Channel *targetchan, const std::string &text, MessageType mt=MSG_PRIVMSG, char status=0)
 
 Privmsg (const std::string &source, const User *targetuser, const std::string &text, MessageType mt=MSG_PRIVMSG)
 
 Privmsg (NoCopy, User *source, const std::string &target, const std::string &text, MessageType mt=MSG_PRIVMSG)
 
 Privmsg (NoCopy, User *source, const Channel *targetchan, const std::string &text, MessageType mt=MSG_PRIVMSG, char status=0)
 
 Privmsg (NoCopy, User *source, const User *targetuser, const std::string &text, MessageType mt=MSG_PRIVMSG)
 
 Privmsg (NoCopy, const std::string &source, const std::string &target, const std::string &text, MessageType mt=MSG_PRIVMSG)
 
 Privmsg (NoCopy, const std::string &source, const Channel *targetchan, const std::string &text, MessageType mt=MSG_PRIVMSG, char status=0)
 
 Privmsg (NoCopy, const std::string &source, const User *targetuser, const std::string &text, MessageType mt=MSG_PRIVMSG)
 
- Public Member Functions inherited from ClientProtocol::Message
 Message (const char *cmd, User *Sourceuser=NULL)
 
 Message (const char *cmd, const std::string &Sourcestr, User *Sourceuser=NULL)
 
const ParamList & GetParams () const
 
const TagMapGetTags () const
 
const char * GetCommand () const
 
void PushParam (const char *str)
 
void PushParam (const std::string &str)
 
void PushParamRef (const std::string &str)
 
void PushParamPlaceholder ()
 
void ReplaceParam (unsigned int index, const char *str)
 
void ReplaceParam (unsigned int index, const std::string &str)
 
void ReplaceParamRef (unsigned int index, const std::string &str)
 
void AddTag (const std::string &tagname, MessageTagProvider *tagprov, const std::string &val, void *tagdata=NULL)
 
void AddTags (const ClientProtocol::TagMap &newtags)
 
const SerializedMessage & GetSerialized (const SerializedInfo &serializeinfo) const
 
void ClearParams ()
 
void InvalidateCache ()
 
void CopyAll ()
 
void SetSideEffect (bool Sideeffect)
 
bool IsSideEffect () const
 
- Public Member Functions inherited from ClientProtocol::MessageSource
 MessageSource (User *Sourceuser=NULL)
 
 MessageSource (const std::string &Sourcestr, User *Sourceuser=NULL)
 
const std::string * GetSource () const
 
UserGetSourceUser () const
 
void SetSourceUser (User *Sourceuser)
 
void SetSource (const std::string &Sourcestr, User *Sourceuser=NULL)
 
void SetSource (const MessageSource &other)
 

Static Public Member Functions

static const char * CommandStrFromMsgType (MessageType mt)
 

Additional Inherited Members

- Protected Member Functions inherited from ClientProtocol::Message
void SetCommand (const char *cmd)
 

Detailed Description

PRIVMSG and NOTICE message.

Member Enumeration Documentation

◆ NoCopy

Used to differentiate constructors that copy the text from constructors that do not.

Constructor & Destructor Documentation

◆ Privmsg() [1/12]

ClientProtocol::Messages::Privmsg::Privmsg ( User source,
const std::string &  target,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG 
)
inline

Constructor, user source, string target, copies text.

Parameters
sourceSource user.
targetPrivmsg target string.
textPrivmsg text, will be copied.
mtMessage type.

◆ Privmsg() [2/12]

ClientProtocol::Messages::Privmsg::Privmsg ( User source,
const Channel targetchan,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG,
char  status = 0 
)
inline

Constructor, user source, user target, copies text.

Parameters
sourceSource user.
targetchanTarget channel.
textPrivmsg text, will be copied.
mtMessage type.
statusPrefix character for status messages. If non-zero the message is a status message. Optional, defaults to 0.

◆ Privmsg() [3/12]

ClientProtocol::Messages::Privmsg::Privmsg ( User source,
const User targetuser,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG 
)
inline

Constructor, user source, user target, copies text.

Parameters
sourceSource user.
targetuserTarget user.
textPrivmsg text, will be copied.
mtMessage type.

◆ Privmsg() [4/12]

ClientProtocol::Messages::Privmsg::Privmsg ( const std::string &  source,
const std::string &  target,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG 
)
inline

Constructor, string source, string target, copies text.

Parameters
sourceSource user.
targetTarget string.
textPrivmsg text, will be copied.
mtMessage type.

◆ Privmsg() [5/12]

ClientProtocol::Messages::Privmsg::Privmsg ( const std::string &  source,
const Channel targetchan,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG,
char  status = 0 
)
inline

Constructor, string source, channel target, copies text.

Parameters
sourceSource string.
targetchanTarget channel.
textPrivmsg text, will be copied.
statusPrefix character for status messages. If non-zero the message is a status message. Optional, defaults to 0.
mtMessage type.

◆ Privmsg() [6/12]

ClientProtocol::Messages::Privmsg::Privmsg ( const std::string &  source,
const User targetuser,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG 
)
inline

Constructor, string source, user target, copies text.

Parameters
sourceSource string.
targetuserTarget user.
textPrivmsg text, will be copied.
mtMessage type.

◆ Privmsg() [7/12]

ClientProtocol::Messages::Privmsg::Privmsg ( NoCopy  ,
User source,
const std::string &  target,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG 
)
inline

Constructor, user source, string target, copies text.

Parameters
sourceSource user.
targetTarget string.
textPrivmsg text, will not be copied.
mtMessage type.

◆ Privmsg() [8/12]

ClientProtocol::Messages::Privmsg::Privmsg ( NoCopy  ,
User source,
const Channel targetchan,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG,
char  status = 0 
)
inline

Constructor, user source, channel target, does not copy text.

Parameters
sourceSource user.
targetchanTarget channel.
textPrivmsg text, will not be copied.
statusPrefix character for status messages. If non-zero the message is a status message. Optional, defaults to 0.
mtMessage type.

◆ Privmsg() [9/12]

ClientProtocol::Messages::Privmsg::Privmsg ( NoCopy  ,
User source,
const User targetuser,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG 
)
inline

Constructor, user source, user target, does not copy text.

Parameters
sourceSource user.
targetuserTarget user.
textPrivmsg text, will not be copied.
mtMessage type.

◆ Privmsg() [10/12]

ClientProtocol::Messages::Privmsg::Privmsg ( NoCopy  ,
const std::string &  source,
const std::string &  target,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG 
)
inline

Constructor, string source, string target, does not copy text.

Parameters
sourceSource string.
targetTarget string.
textPrivmsg text, will not be copied.
mtMessage type.

◆ Privmsg() [11/12]

ClientProtocol::Messages::Privmsg::Privmsg ( NoCopy  ,
const std::string &  source,
const Channel targetchan,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG,
char  status = 0 
)
inline

Constructor, string source, channel target, does not copy text.

Parameters
sourceSource string.
targetchanTarget channel.
textPrivmsg text, will not be copied.
statusPrefix character for status messages. If non-zero the message is a status message. Optional, defaults to 0.
mtMessage type.

◆ Privmsg() [12/12]

ClientProtocol::Messages::Privmsg::Privmsg ( NoCopy  ,
const std::string &  source,
const User targetuser,
const std::string &  text,
MessageType  mt = MSG_PRIVMSG 
)
inline

Constructor, string source, user target, does not copy text.

Parameters
sourceSource string.
targetuserTarget user.
textPrivmsg text, will not be copied.
mtMessage type.

Member Function Documentation

◆ CommandStrFromMsgType()

static const char* ClientProtocol::Messages::Privmsg::CommandStrFromMsgType ( MessageType  mt)
inlinestatic

Get command name from MessageType.

Parameters
mtMessage type to get command name for.
Returns
Command name for the message type.

The documentation for this class was generated from the following file: