author | skyhusker <skyhusker> | 2005-06-09 17:30:09 (UTC) |
---|---|---|
committer | skyhusker <skyhusker> | 2005-06-09 17:30:09 (UTC) |
commit | 2ed64fcf5a3c93ce613e63461cb925568c7df887 (patch) (side-by-side diff) | |
tree | ac95266cc27b3bd50e374ab718aadf243ce99524 | |
parent | 6be140832d97bb485ba98bc9ea0f5cf622330595 (diff) | |
download | opie-2ed64fcf5a3c93ce613e63461cb925568c7df887.zip opie-2ed64fcf5a3c93ce613e63461cb925568c7df887.tar.gz opie-2ed64fcf5a3c93ce613e63461cb925568c7df887.tar.bz2 |
Fix #1667
-rw-r--r-- | noncore/net/opieirc/ircmessageparser.cpp | 5 |
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 @@ -71,16 +71,17 @@ IRCNumericalMessageParserStruct IRCMessageParser::numericalParserProcTable[] = { { 369, "%1 :%2", "1,2", 0 }, // RPL_ENDOFWHOWAS { 372, "%1", "1", 0 }, // RPL_MOTD { 375, "%1", "1", 0 }, // RPL_MOTDSTART { 376, "%1", "1", 0 }, // RPL_ENDOFMOTD { 377, "%1", "1", 0 }, // RPL_MOTD2 { 378, "%1", "1", 0 }, // RPL_MOTD3 { 391, QT_TR_NOOP("Time on server %1 is %2"), "1,2", 0 }, // RPL_TIME { 401, QT_TR_NOOP("Channel or nick %1 doesn't exists"), "1", 0 }, // ERR_NOSUCHNICK + { 403, QT_TR_NOOP("Channel %1 doesn't exists"), "1", 0 }, // ERR_ERR_NOSUCHCHANNEL { 406, QT_TR_NOOP("There is no history information for %1"), "1", 0 }, // ERR_WASNOSUCHNICK { 409, "%1", "1", 0 }, // ERR_NOORIGIN { 411, "%1", "1", 0 }, // ERR_NORECIPIENT { 412, "%1", "1", 0 }, // ERR_NOTEXTTOSEND { 421, QT_TR_NOOP("Unknown command: %1"), "1", 0 }, // ERR_ERR_UNKNOWNCOMMAND { 422, "%1", "1", 0 }, // ERR_NOMOTD { 433, QT_TR_NOOP("Can't change nick to %1: %2"), "1,2", FUNC(parseNumericalNicknameInUse) }, // ERR_NICKNAMEINUSE { 442, QT_TR_NOOP("You're not on channel %1"), "1", 0}, // ERR_NOTONCHANNEL @@ -264,17 +265,17 @@ void IRCMessageParser::parseLiteralPrivMsg(IRCMessage *message) { person = new IRCPerson(message->prefix()); m_session->addPerson(person); } IRCOutput output(OUTPUT_QUERYPRIVMSG, message->param(1)); output.addParam(person); emit outputReady(output); } else - if (message->param(0).at(0) == '#' || message->param(0).at(0) == '+') { + if (IRCChannel::isValid(message->param(0))) { /* IRC Channel message detected, verify sender, channel and display it */ IRCChannel *channel = m_session->getChannel(message->param(0).lower()); if (channel) { IRCPerson mask(message->prefix()); IRCChannelPerson *person = channel->getPerson(mask.nick()); if (person) { IRCOutput output(OUTPUT_CHANPRIVMSG, message->param(1)); output.addParam(channel); @@ -485,17 +486,17 @@ void IRCMessageParser::parseCTCPDCC(IRCMessage *message) { static_cast<IRCServerTab*>(m_session->parent())->mainwindow()->addDCC(DCCTransfer::Recv, params[2].toUInt(), params[3].toUInt(), filename, nickname, params[4].toUInt()); } } void IRCMessageParser::parseLiteralMode(IRCMessage *message) { IRCPerson mask(message->prefix()); - if (message->param(0).startsWith("#")) { + if (IRCChannel::isValid(message->param(0))) { IRCChannel *channel = m_session->getChannel(message->param(0).lower()); if (channel) { QString temp, parameters = message->allParameters().right(message->allParameters().length() - channel->channelname().length() - 1); QTextIStream stream(¶meters); bool set = FALSE; while (!stream.atEnd()) { stream >> temp; if (temp.startsWith("+")) { |