Diffstat (limited to 'noncore/net/opieirc/ircmessage.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircmessage.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircmessage.cpp b/noncore/net/opieirc/ircmessage.cpp index 74e9c6f..9c2869c 100644 --- a/noncore/net/opieirc/ircmessage.cpp +++ b/noncore/net/opieirc/ircmessage.cpp | |||
@@ -21,24 +21,27 @@ IRCMessage::IRCMessage(QString line) { | |||
21 | m_command = temp.upper(); | 21 | m_command = temp.upper(); |
22 | m_allParameters = line.right(line.length() - m_prefix.length() - m_command.length() - 3); | 22 | m_allParameters = line.right(line.length() - m_prefix.length() - m_command.length() - 3); |
23 | } else { | 23 | } else { |
24 | m_command = temp.upper(); | 24 | m_command = temp.upper(); |
25 | m_allParameters = line.right(line.length() - m_command.length() - 1); | 25 | m_allParameters = line.right(line.length() - m_command.length() - 1); |
26 | } | 26 | } |
27 | |||
27 | /* Create a list of all parameters */ | 28 | /* Create a list of all parameters */ |
28 | while(!(stream.atEnd())) { | 29 | while(!(stream.atEnd())) { |
29 | stream >> temp; | 30 | stream >> temp; |
30 | if (temp.startsWith(":")) { | 31 | if (temp.startsWith(":")) { |
31 | /* last parameter */ | 32 | /* last parameter */ |
32 | m_trailing = line.right(line.length() - line.find(QChar(':'), 1) - 1); | 33 | m_trailing = line.right(line.length() - line.find(QChar(':'), 1) - 1); |
33 | m_parameters << m_trailing; | 34 | m_parameters << m_trailing; |
34 | break; | 35 | break; |
35 | } else { | 36 | } else { |
36 | m_parameters << temp; | 37 | m_parameters << temp; |
37 | } | 38 | } |
38 | } | 39 | } |
40 | |||
41 | |||
39 | m_commandNumber = m_command.toInt(&m_isNumerical); | 42 | m_commandNumber = m_command.toInt(&m_isNumerical); |
40 | /* Is this a CTCP command */ | 43 | /* Is this a CTCP command */ |
41 | if ((m_command == "PRIVMSG" || m_command == "NOTICE") && m_trailing.length()>0 && m_trailing.left(1) == QChar(1)) { | 44 | if ((m_command == "PRIVMSG" || m_command == "NOTICE") && m_trailing.length()>0 && m_trailing.left(1) == QChar(1)) { |
42 | m_ctcp = TRUE; | 45 | m_ctcp = TRUE; |
43 | /* Strip CTCP \001 characters */ | 46 | /* Strip CTCP \001 characters */ |
44 | m_allParameters = m_allParameters.replace(QRegExp(QChar(1)), ""); | 47 | m_allParameters = m_allParameters.replace(QRegExp(QChar(1)), ""); |