|
|
The IRCMessage class parses a raw IRC server message into an array of tokens, taking into account the special case ':' character.
IRCMessage (const char* rawMessage) |
Construct a new IRCMessage from the string contained in rawMessage.
Parameters:
rawMessage | The string to parse. |
void setMessage (const char* rawMessage) |
Parse rawMessage string into its different components.
Parameters:
rawMessage | The string to parse. |
const QString& getSourceNick () |
Get the source of the message, as contained in the original string. If the message originated from a client, getSourceNick() returns only the nickname of that client. If the message was sent by a server, getSourceNick() returns the full name of that server.
Returns: The nick of the client who sent the message, or the name of the server if the message was sent by a server.
const QString& getSourceUserName () |
Get the username of the client who sent the message.
Returns: The username of the client who sent the message, or an empty string in case of a server message.
const QString& getSourceHost () |
Get the host of the client who sent the message.
Returns: The host of the client who sent the message, or an empty string in case of a server message.
unsigned int getNumeric () |
Get the numeric number of a numeric reply message. Constants for the different replies are defined in numeric.h.
PRECONDITIONS: isNumericReply()
Returns: The identifying number of the numeric reply.
bool isNumericReply () |
Determine wether the message is a numeric reply. Numeric replies are in the format server 999 param1 param2.
Returns: true if the message is a numeric reply, false otherwise.
bool sourceIsServer () |
Determine wether the message was sent by a server.
Returns: true if the source of the message is a server, false otherwise.