summaryrefslogtreecommitdiff
authorskyhusker <skyhusker>2005-02-02 13:36:32 (UTC)
committer skyhusker <skyhusker>2005-02-02 13:36:32 (UTC)
commit737b0b5ce3e5db15bf11f696b070c9b475f92b61 (patch) (unidiff)
treef37a834ddaffc9447c71a86c594a522fe97295b7
parentf1f48d6711b359499c7ab3b9102a25f21259df53 (diff)
downloadopie-737b0b5ce3e5db15bf11f696b070c9b475f92b61.zip
opie-737b0b5ce3e5db15bf11f696b070c9b475f92b61.tar.gz
opie-737b0b5ce3e5db15bf11f696b070c9b475f92b61.tar.bz2
Slightly modified debug messages
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircmessage.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/net/opieirc/ircmessage.cpp b/noncore/net/opieirc/ircmessage.cpp
index 1b7072e..da8db77 100644
--- a/noncore/net/opieirc/ircmessage.cpp
+++ b/noncore/net/opieirc/ircmessage.cpp
@@ -49,18 +49,14 @@ IRCMessage::IRCMessage(QString line) {
49 49
50 50
51 m_commandNumber = m_command.toInt(&m_isNumerical); 51 m_commandNumber = m_command.toInt(&m_isNumerical);
52 /* Is this a CTCP command */ 52 /* Is this a CTCP command */
53 if ((m_command == "PRIVMSG" || m_command == "NOTICE") && m_trailing.length()>0 && m_trailing.left(1) == QChar(1)) { 53 if ((m_command == "PRIVMSG" || m_command == "NOTICE") && m_trailing.length()>0 && m_trailing.left(1) == QChar(1)) {
54 m_ctcp = TRUE; 54 m_ctcp = TRUE;
55 if (m_command == "PRIVMSG") { 55
56 m_ctcpRequest = TRUE; 56 m_ctcpRequest = (m_command == "PRIVMSG");
57 }
58 else {
59 m_ctcpRequest = FALSE;
60 }
61 57
62 /* Strip CTCP \001 characters */ 58 /* Strip CTCP \001 characters */
63 m_allParameters = m_allParameters.replace(QRegExp(QChar(1)), ""); 59 m_allParameters = m_allParameters.replace(QRegExp(QChar(1)), "");
64 QTextIStream ctcpStream(&m_allParameters); 60 QTextIStream ctcpStream(&m_allParameters);
65 ctcpStream >> m_ctcpDestination; 61 ctcpStream >> m_ctcpDestination;
66 ctcpStream >> temp; 62 ctcpStream >> temp;
@@ -82,18 +78,22 @@ IRCMessage::IRCMessage(QString line) {
82 78
83 79
84 odebug << "Parsed: " << line << oendl; 80 odebug << "Parsed: " << line << oendl;
85 odebug << "Prefix: " << m_prefix << oendl; 81 odebug << "Prefix: " << m_prefix << oendl;
86 odebug << "Command: " << m_command << oendl; 82 odebug << "Command: " << m_command << oendl;
87 odebug << "Allparameters: " << m_allParameters << oendl; 83 odebug << "Allparameters: " << m_allParameters << oendl;
84
88 for (unsigned int i=0; i<m_parameters.count(); i++) { 85 for (unsigned int i=0; i<m_parameters.count(); i++) {
89 odebug << "Parameter " << i << ":" << m_parameters[i] << oendl; 86 odebug << "Parameter " << i << ":" << m_parameters[i] << oendl;
90 } 87 }
91 odebug << "CTCP Command: " << m_ctcpCommand << oendl; 88
92 odebug << "CTCP Destination: " << m_ctcpDestination << oendl; 89 if(m_ctcp) {
93 odebug << "CTCP param count is: " << m_parameters.count() << oendl; 90 odebug << "CTCP " << (m_ctcpRequest? "Request" : "Reply") << ": " << m_ctcpCommand << oendl;
91 odebug << "CTCP Destination: " << m_ctcpDestination << oendl;
92 odebug << "CTCP param count is: " << m_parameters.count() << oendl;
93 }
94 94
95} 95}
96 96
97QString IRCMessage::param(int param) { 97QString IRCMessage::param(int param) {
98 return m_parameters[param]; 98 return m_parameters[param];
99} 99}