6 #include "ircresponsetype.h" 42 QString strResponseType = QString(
"%1").arg(responseType, 3, 10, QChar(
'0'));
46 newIRCResponseType.d.numericType = responseType;
48 return newIRCResponseType;
53 return d.type == other.d.type;
58 return !((*this) == other);
71 int val = str.toInt(&bOk);
73 return bOk ? val : -1;
182 case ERRChannelIsFull:
185 case ERRInviteOnlyChan:
188 case ERRBannedFromChan:
191 case ERRBadChannelKey:
194 case ERRBadChannelMask:
247 QString strTypeUpper = typeRepresentation.trimmed().toUpper();
254 if (strTypeUpper == strCurrent)
QString toRfcString() const
String representation of the message type.
375 - start of the message of the day
Not a real type, denotes number of all types.
253 - how many unknown connections
251 - how many users on how many servers
320 - it's inconclusive what this code means.
Defines types of IRC network response message.
static IRCResponseType fromIntegerResponseValue(int responseType)
Creates IRCResponseType objects taking numeric value as the more important here.
static MsgType typeFromRfcString(const QString &typeRepresentation)
Returns MsgType basing on typeRepresentation.
353 - names list for a channel
376 - end of the message of the day
001 - sent when client connects.
005 - all sorts of server flags.
static int toRfcNumber(MsgType type)
If type can be represented as an integer, this will convert it.
MsgType
Represents types defined by RFC 1459.
307 - no idea what this is, but we'll treat it the same way we treat RPLWhoIsSpecial.
255 - how many clients on how many servers,
int numericType() const
If message type can be represented as number, this will contain its value.
IRCResponseType()
Initializes an invalid IRCResponseType object.
Type unknown to this IRC client.