-rw-r--r-- | noncore/net/opieirc/ircmessageparser.cpp | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/noncore/net/opieirc/ircmessageparser.cpp b/noncore/net/opieirc/ircmessageparser.cpp index 32e1011..c449a65 100644 --- a/noncore/net/opieirc/ircmessageparser.cpp +++ b/noncore/net/opieirc/ircmessageparser.cpp @@ -594,16 +594,31 @@ void IRCMessageParser::parseNumericalNames(IRCMessage *message) { QString nick; /* Parse person flags */ - if (flagch == '@' || flagch == '+' || flagch=='%' || flagch == '*') { + if (flagch == '~' || flagch == '&' || flagch == '@' || flagch == '+' || + flagch=='%' || flagch == '*') { nick = temp.right(temp.length()-1); switch (flagch) { - case '@': flag = IRCChannelPerson::PERSON_FLAG_OP; break; - case '+': flag = IRCChannelPerson::PERSON_FLAG_VOICE; break; - case '%': flag = IRCChannelPerson::PERSON_FLAG_HALFOP; break; - default : flag = 0; break; - } - } else { + /** + * @note '~' and `&' are extensions of the unrealircd irc + * daemon. This app can't see users w/out checking for these + * chars. + */ + case '~': + case '&': + case '@': + flag = IRCChannelPerson::PERSON_FLAG_OP; + break; + case '+': + flag = IRCChannelPerson::PERSON_FLAG_VOICE; + break; + case '%': + flag = IRCChannelPerson::PERSON_FLAG_HALFOP; + break; + default : + flag = 0; + break; + } + } else nick = temp; - } IRCPerson *person = m_session->getPerson(nick); @@ -617,7 +632,7 @@ void IRCMessageParser::parseNumericalNames(IRCMessage *message) { channel->addPerson(chan_person); } - } else { - emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Server message with unknown channel"))); - } + } else + emit outputReady(IRCOutput(OUTPUT_ERROR, + tr("Server message with unknown channel"))); } |