class IRCMessage

Parse and handle IRC-format messages. More...

Definition#include <IRCMessage.h>
InheritsMessage
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

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:
rawMessageThe string to parse.

void setMessage (const char* rawMessage)
[virtual]

Parse rawMessage string into its different components.

Parameters:
rawMessageThe string to parse.

const QString& getSourceNick ()
[const]

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 ()
[const]

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 ()
[const]

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 ()
[const]

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 ()
[const]

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 ()
[const]

Determine wether the message was sent by a server.

Returns: true if the source of the message is a server, false otherwise.