-rw-r--r-- | noncore/net/opieirc/ircmessage.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/noncore/net/opieirc/ircmessage.cpp b/noncore/net/opieirc/ircmessage.cpp index 41386ee..d19e9e6 100644 --- a/noncore/net/opieirc/ircmessage.cpp +++ b/noncore/net/opieirc/ircmessage.cpp | |||
@@ -1 +1,6 @@ | |||
1 | #include <opie2/odebug.h> | ||
2 | |||
3 | using namespace Opie::Core; | ||
4 | |||
5 | |||
1 | #include <qtextstream.h> | 6 | #include <qtextstream.h> |
@@ -71,16 +76,13 @@ IRCMessage::IRCMessage(QString line) { | |||
71 | 76 | ||
72 | //-- Uncomment to debug -- | 77 | odebug << "Parsed: " << line << oendl; |
73 | /* | 78 | odebug << "Prefix: " << m_prefix << oendl; |
74 | printf("Parsed : '%s'\n", line.ascii()); | 79 | odebug << "Command: " << m_command << oendl; |
75 | printf("Prefix : '%s'\n", m_prefix.ascii()); | 80 | odebug << "Allparameters: " << m_allParameters << oendl; |
76 | printf("Command : '%s'\n", m_command.ascii()); | ||
77 | printf("Allparameters : '%s'\n", m_allParameters.ascii()); | ||
78 | for (unsigned int i=0; i<m_parameters.count(); i++) { | 81 | for (unsigned int i=0; i<m_parameters.count(); i++) { |
79 | printf("Parameter %i : '%s'\n", i, m_parameters[i].ascii()); | 82 | odebug << "Parameter " << i << ":" << m_parameters[i] << oendl; |
80 | } | 83 | } |
81 | printf("CTCP Command : '%s'\n", m_ctcpCommand.latin1()); | 84 | odebug << "CTCP Command: " << m_ctcpCommand << oendl; |
82 | printf("CTCP Destination : '%s'\n", m_ctcpDestination.latin1()); | 85 | odebug << "CTCP Destination: " << m_ctcpDestination << oendl; |
83 | printf("CTCP param count is : '%i'\n", m_parameters.count()); | 86 | odebug << "CTCP param count is: " << m_parameters.count() << oendl; |
84 | */ | 87 | |
85 | |||
86 | } | 88 | } |
@@ -99,4 +101,4 @@ QStringList IRCMessage::params(const QString ¶mstring) const { | |||
99 | if(pos < 0) { | 101 | if(pos < 0) { |
100 | if(static_cast<unsigned int>((*it).toInt()) < m_parameters.count()) | 102 | if((*it).toUInt() < m_parameters.count()) |
101 | retvalue << m_parameters[(*it).toInt()]; | 103 | retvalue << m_parameters[(*it).toUInt()]; |
102 | } | 104 | } |
@@ -104,6 +106,6 @@ QStringList IRCMessage::params(const QString ¶mstring) const { | |||
104 | else { | 106 | else { |
105 | int start, end; | 107 | unsigned int start, end; |
106 | start = (*it).left(pos).toInt(); | 108 | start = (*it).left(pos).toUInt(); |
107 | end = (*it).mid(pos+1).toInt(); | 109 | end = (*it).mid(pos+1).toUInt(); |
108 | for (int i=start;i<=end && i < static_cast<int>(m_parameters.count()) ;++i) { | 110 | for (unsigned int i=start;i<=end && i < m_parameters.count() ;++i) { |
109 | retvalue << m_parameters[i]; | 111 | retvalue << m_parameters[i]; |