-rw-r--r-- | noncore/net/opieirc/ircmessageparser.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/noncore/net/opieirc/ircmessageparser.cpp b/noncore/net/opieirc/ircmessageparser.cpp index d1b70a5..2b77414 100644 --- a/noncore/net/opieirc/ircmessageparser.cpp +++ b/noncore/net/opieirc/ircmessageparser.cpp | |||
@@ -36,4 +36,8 @@ IRCNumericalMessageParserStruct IRCMessageParser::numericalParserProcTable[] = { | |||
36 | { 5, FUNC(parseNumerical005) }, // RPL_BOUNCE, RPL_PROTOCTL | 36 | { 5, FUNC(parseNumerical005) }, // RPL_BOUNCE, RPL_PROTOCTL |
37 | { 251, FUNC(parseNumericalStats) }, // RPL_LUSERCLIENT | 37 | { 251, FUNC(parseNumericalStats) }, // RPL_LUSERCLIENT |
38 | { 252, FUNC(parseNumericalStats) }, // RPL_LUSEROP | ||
39 | { 265, FUNC(parseNumericalStats) }, // RPL_LOCALUSERS | ||
40 | { 266, FUNC(parseNumericalStats) }, // RPL_GLOBALUSERS | ||
41 | { 250, FUNC(parseNumericalStats) }, // RPL_STATSCONN | ||
38 | { 254, FUNC(nullFunc)}, // RPL_LUSERCHANNELS | 42 | { 254, FUNC(nullFunc)}, // RPL_LUSERCHANNELS |
39 | { 255, FUNC(parseNumericalStats) }, // RPL_LUSERNAME | 43 | { 255, FUNC(parseNumericalStats) }, // RPL_LUSERNAME |
@@ -101,5 +105,5 @@ void IRCMessageParser::parseLiteralNotice(IRCMessage *message) { | |||
101 | 105 | ||
102 | void IRCMessageParser::parseLiteralJoin(IRCMessage *message) { | 106 | void IRCMessageParser::parseLiteralJoin(IRCMessage *message) { |
103 | QString channelName = message->param(0); | 107 | QString channelName = message->param(0).lower(); |
104 | IRCPerson mask(message->prefix()); | 108 | IRCPerson mask(message->prefix()); |
105 | IRCChannel *channel = m_session->getChannel(channelName); | 109 | IRCChannel *channel = m_session->getChannel(channelName); |
@@ -139,5 +143,5 @@ void IRCMessageParser::parseLiteralJoin(IRCMessage *message) { | |||
139 | 143 | ||
140 | void IRCMessageParser::parseLiteralPart(IRCMessage *message) { | 144 | void IRCMessageParser::parseLiteralPart(IRCMessage *message) { |
141 | QString channelName = message->param(0); | 145 | QString channelName = message->param(0).lower(); |
142 | IRCChannel *channel = m_session->getChannel(channelName); | 146 | IRCChannel *channel = m_session->getChannel(channelName); |
143 | IRCPerson mask(message->prefix()); | 147 | IRCPerson mask(message->prefix()); |
@@ -182,5 +186,5 @@ void IRCMessageParser::parseLiteralPrivMsg(IRCMessage *message) { | |||
182 | } else if (message->param(0).at(0) == '#') { | 186 | } else if (message->param(0).at(0) == '#') { |
183 | /* IRC Channel message detected, verify sender, channel and display it */ | 187 | /* IRC Channel message detected, verify sender, channel and display it */ |
184 | IRCChannel *channel = m_session->getChannel(message->param(0)); | 188 | IRCChannel *channel = m_session->getChannel(message->param(0).lower()); |
185 | if (channel) { | 189 | if (channel) { |
186 | IRCPerson mask(message->prefix()); | 190 | IRCPerson mask(message->prefix()); |
@@ -195,5 +199,5 @@ void IRCMessageParser::parseLiteralPrivMsg(IRCMessage *message) { | |||
195 | } | 199 | } |
196 | } else { | 200 | } else { |
197 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown channel ") + message->param(0))); | 201 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown channel ") + message->param(0).lower())); |
198 | } | 202 | } |
199 | } else { | 203 | } else { |
@@ -248,5 +252,5 @@ void IRCMessageParser::parseLiteralQuit(IRCMessage *message) { | |||
248 | void IRCMessageParser::parseLiteralTopic(IRCMessage *message) { | 252 | void IRCMessageParser::parseLiteralTopic(IRCMessage *message) { |
249 | IRCPerson mask(message->prefix()); | 253 | IRCPerson mask(message->prefix()); |
250 | IRCChannel *channel = m_session->getChannel(message->param(0)); | 254 | IRCChannel *channel = m_session->getChannel(message->param(0).lower()); |
251 | if (channel) { | 255 | if (channel) { |
252 | IRCOutput output(OUTPUT_TOPIC, mask.nick() + tr(" changed topic to ") + "\"" + message->param(1) + "\""); | 256 | IRCOutput output(OUTPUT_TOPIC, mask.nick() + tr(" changed topic to ") + "\"" + message->param(1) + "\""); |
@@ -278,5 +282,5 @@ void IRCMessageParser::parseCTCPAction(IRCMessage *message) { | |||
278 | QString dest = message->ctcpDestination(); | 282 | QString dest = message->ctcpDestination(); |
279 | if (dest.startsWith("#")) { | 283 | if (dest.startsWith("#")) { |
280 | IRCChannel *channel = m_session->getChannel(dest); | 284 | IRCChannel *channel = m_session->getChannel(dest.lower()); |
281 | if (channel) { | 285 | if (channel) { |
282 | IRCChannelPerson *person = channel->getPerson(mask.nick()); | 286 | IRCChannelPerson *person = channel->getPerson(mask.nick()); |
@@ -313,5 +317,5 @@ void IRCMessageParser::parseLiteralMode(IRCMessage *message) { | |||
313 | 317 | ||
314 | if (message->param(0).startsWith("#")) { | 318 | if (message->param(0).startsWith("#")) { |
315 | IRCChannel *channel = m_session->getChannel(message->param(0)); | 319 | IRCChannel *channel = m_session->getChannel(message->param(0).lower()); |
316 | if (channel) { | 320 | if (channel) { |
317 | QString temp, parameters = message->allParameters().right(message->allParameters().length() - channel->channelname().length() - 1); | 321 | QString temp, parameters = message->allParameters().right(message->allParameters().length() - channel->channelname().length() - 1); |
@@ -384,5 +388,5 @@ void IRCMessageParser::parseLiteralMode(IRCMessage *message) { | |||
384 | void IRCMessageParser::parseLiteralKick(IRCMessage *message) { | 388 | void IRCMessageParser::parseLiteralKick(IRCMessage *message) { |
385 | IRCPerson mask(message->prefix()); | 389 | IRCPerson mask(message->prefix()); |
386 | IRCChannel *channel = m_session->getChannel(message->param(0)); | 390 | IRCChannel *channel = m_session->getChannel(message->param(0).lower()); |
387 | if (channel) { | 391 | if (channel) { |
388 | IRCChannelPerson *person = channel->getPerson(message->param(1)); | 392 | IRCChannelPerson *person = channel->getPerson(message->param(1)); |
@@ -435,5 +439,5 @@ void IRCMessageParser::parseNumericalStats(IRCMessage *message) { | |||
435 | void IRCMessageParser::parseNumericalNames(IRCMessage *message) { | 439 | void IRCMessageParser::parseNumericalNames(IRCMessage *message) { |
436 | /* Name list sent when joining a channel */ | 440 | /* Name list sent when joining a channel */ |
437 | IRCChannel *channel = m_session->getChannel(message->param(2)); | 441 | IRCChannel *channel = m_session->getChannel(message->param(2).lower()); |
438 | if (channel != 0) { | 442 | if (channel != 0) { |
439 | QString people = message->param(3); | 443 | QString people = message->param(3); |
@@ -479,5 +483,5 @@ void IRCMessageParser::parseNumericalNames(IRCMessage *message) { | |||
479 | void IRCMessageParser::parseNumericalEndOfNames(IRCMessage *message) { | 483 | void IRCMessageParser::parseNumericalEndOfNames(IRCMessage *message) { |
480 | /* Done syncing to channel */ | 484 | /* Done syncing to channel */ |
481 | IRCChannel *channel = m_session->getChannel(message->param(1)); | 485 | IRCChannel *channel = m_session->getChannel(message->param(1).lower()); |
482 | if (channel) { | 486 | if (channel) { |
483 | channel->setHasPeople(TRUE); | 487 | channel->setHasPeople(TRUE); |
@@ -502,5 +506,5 @@ void IRCMessageParser::parseNumericalNoSuchNick(IRCMessage *) { | |||
502 | 506 | ||
503 | void IRCMessageParser::parseNumericalTopic(IRCMessage *message) { | 507 | void IRCMessageParser::parseNumericalTopic(IRCMessage *message) { |
504 | IRCChannel *channel = m_session->getChannel(message->param(1)); | 508 | IRCChannel *channel = m_session->getChannel(message->param(1).lower()); |
505 | if (channel) { | 509 | if (channel) { |
506 | IRCOutput output(OUTPUT_TOPIC, tr("Topic for channel " + channel->channelname() + " is \"" + message->param(2) + "\"")); | 510 | IRCOutput output(OUTPUT_TOPIC, tr("Topic for channel " + channel->channelname() + " is \"" + message->param(2) + "\"")); |