summaryrefslogtreecommitdiff
path: root/noncore/net
authorskyhusker <skyhusker>2005-06-09 17:30:09 (UTC)
committer skyhusker <skyhusker>2005-06-09 17:30:09 (UTC)
commit2ed64fcf5a3c93ce613e63461cb925568c7df887 (patch) (unidiff)
treeac95266cc27b3bd50e374ab718aadf243ce99524 /noncore/net
parent6be140832d97bb485ba98bc9ea0f5cf622330595 (diff)
downloadopie-2ed64fcf5a3c93ce613e63461cb925568c7df887.zip
opie-2ed64fcf5a3c93ce613e63461cb925568c7df887.tar.gz
opie-2ed64fcf5a3c93ce613e63461cb925568c7df887.tar.bz2
Fix #1667
Diffstat (limited to 'noncore/net') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircmessageparser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/net/opieirc/ircmessageparser.cpp b/noncore/net/opieirc/ircmessageparser.cpp
index 939cdae..32e1011 100644
--- a/noncore/net/opieirc/ircmessageparser.cpp
+++ b/noncore/net/opieirc/ircmessageparser.cpp
@@ -73,12 +73,13 @@ IRCNumericalMessageParserStruct IRCMessageParser::numericalParserProcTable[] = {
73 { 375, "%1", "1", 0 }, // RPL_MOTDSTART 73 { 375, "%1", "1", 0 }, // RPL_MOTDSTART
74 { 376, "%1", "1", 0 }, // RPL_ENDOFMOTD 74 { 376, "%1", "1", 0 }, // RPL_ENDOFMOTD
75 { 377, "%1", "1", 0 }, // RPL_MOTD2 75 { 377, "%1", "1", 0 }, // RPL_MOTD2
76 { 378, "%1", "1", 0 }, // RPL_MOTD3 76 { 378, "%1", "1", 0 }, // RPL_MOTD3
77 { 391, QT_TR_NOOP("Time on server %1 is %2"), "1,2", 0 }, // RPL_TIME 77 { 391, QT_TR_NOOP("Time on server %1 is %2"), "1,2", 0 }, // RPL_TIME
78 { 401, QT_TR_NOOP("Channel or nick %1 doesn't exists"), "1", 0 }, // ERR_NOSUCHNICK 78 { 401, QT_TR_NOOP("Channel or nick %1 doesn't exists"), "1", 0 }, // ERR_NOSUCHNICK
79 { 403, QT_TR_NOOP("Channel %1 doesn't exists"), "1", 0 }, // ERR_ERR_NOSUCHCHANNEL
79 { 406, QT_TR_NOOP("There is no history information for %1"), "1", 0 }, // ERR_WASNOSUCHNICK 80 { 406, QT_TR_NOOP("There is no history information for %1"), "1", 0 }, // ERR_WASNOSUCHNICK
80 { 409, "%1", "1", 0 }, // ERR_NOORIGIN 81 { 409, "%1", "1", 0 }, // ERR_NOORIGIN
81 { 411, "%1", "1", 0 }, // ERR_NORECIPIENT 82 { 411, "%1", "1", 0 }, // ERR_NORECIPIENT
82 { 412, "%1", "1", 0 }, // ERR_NOTEXTTOSEND 83 { 412, "%1", "1", 0 }, // ERR_NOTEXTTOSEND
83 { 421, QT_TR_NOOP("Unknown command: %1"), "1", 0 }, // ERR_ERR_UNKNOWNCOMMAND 84 { 421, QT_TR_NOOP("Unknown command: %1"), "1", 0 }, // ERR_ERR_UNKNOWNCOMMAND
84 { 422, "%1", "1", 0 }, // ERR_NOMOTD 85 { 422, "%1", "1", 0 }, // ERR_NOMOTD
@@ -266,13 +267,13 @@ void IRCMessageParser::parseLiteralPrivMsg(IRCMessage *message) {
266 } 267 }
267 IRCOutput output(OUTPUT_QUERYPRIVMSG, message->param(1)); 268 IRCOutput output(OUTPUT_QUERYPRIVMSG, message->param(1));
268 output.addParam(person); 269 output.addParam(person);
269 emit outputReady(output); 270 emit outputReady(output);
270 } 271 }
271 else 272 else
272 if (message->param(0).at(0) == '#' || message->param(0).at(0) == '+') { 273 if (IRCChannel::isValid(message->param(0))) {
273 /* IRC Channel message detected, verify sender, channel and display it */ 274 /* IRC Channel message detected, verify sender, channel and display it */
274 IRCChannel *channel = m_session->getChannel(message->param(0).lower()); 275 IRCChannel *channel = m_session->getChannel(message->param(0).lower());
275 if (channel) { 276 if (channel) {
276 IRCPerson mask(message->prefix()); 277 IRCPerson mask(message->prefix());
277 IRCChannelPerson *person = channel->getPerson(mask.nick()); 278 IRCChannelPerson *person = channel->getPerson(mask.nick());
278 if (person) { 279 if (person) {
@@ -487,13 +488,13 @@ void IRCMessageParser::parseCTCPDCC(IRCMessage *message) {
487 } 488 }
488} 489}
489 490
490void IRCMessageParser::parseLiteralMode(IRCMessage *message) { 491void IRCMessageParser::parseLiteralMode(IRCMessage *message) {
491 IRCPerson mask(message->prefix()); 492 IRCPerson mask(message->prefix());
492 493
493 if (message->param(0).startsWith("#")) { 494 if (IRCChannel::isValid(message->param(0))) {
494 IRCChannel *channel = m_session->getChannel(message->param(0).lower()); 495 IRCChannel *channel = m_session->getChannel(message->param(0).lower());
495 if (channel) { 496 if (channel) {
496 QString temp, parameters = message->allParameters().right(message->allParameters().length() - channel->channelname().length() - 1); 497 QString temp, parameters = message->allParameters().right(message->allParameters().length() - channel->channelname().length() - 1);
497 QTextIStream stream(&parameters); 498 QTextIStream stream(&parameters);
498 bool set = FALSE; 499 bool set = FALSE;
499 while (!stream.atEnd()) { 500 while (!stream.atEnd()) {