summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircmessage.h
Unidiff
Diffstat (limited to 'noncore/net/opieirc/ircmessage.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircmessage.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircmessage.h b/noncore/net/opieirc/ircmessage.h
index 10ba450..40bb210 100644
--- a/noncore/net/opieirc/ircmessage.h
+++ b/noncore/net/opieirc/ircmessage.h
@@ -17,54 +17,57 @@
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18
19*/ 19*/
20 20
21#ifndef __IRCMESSAGE_H 21#ifndef __IRCMESSAGE_H
22#define __IRCMESSAGE_H 22#define __IRCMESSAGE_H
23 23
24class QString; 24class QString;
25class QStringList; 25class QStringList;
26 26
27/* IRCMessage objects are used to encapsulate information 27/* IRCMessage objects are used to encapsulate information
28 which the IRC server sent to us. */ 28 which the IRC server sent to us. */
29 29
30class IRCMessage { 30class IRCMessage {
31public: 31public:
32 /* Parse an IRC message and create the IRCMessage object */ 32 /* Parse an IRC message and create the IRCMessage object */
33 IRCMessage(QString line); 33 IRCMessage(QString line);
34 34
35 /* Return the IRC message prefix (usually sender etc) */ 35 /* Return the IRC message prefix (usually sender etc) */
36 QString prefix(); 36 QString prefix();
37 /* Check if this IRCMessage's command is literal or numerical */ 37 /* Check if this IRCMessage's command is literal or numerical */
38 bool isNumerical(); 38 bool isNumerical();
39 /* CHeck if this IRCMessage is a CTCP message */ 39 /* CHeck if this IRCMessage is a CTCP message */
40 bool isCTCP(); 40 bool isCTCP();
41 bool isCTCPRequest();
42 bool isCTCPReply();
41 /* Return the IRC command (literal commands) */ 43 /* Return the IRC command (literal commands) */
42 QString command(); 44 QString command();
43 /* Return the CTCP command */ 45 /* Return the CTCP command */
44 QString ctcpCommand(); 46 QString ctcpCommand();
45 /* Return the CTCP destination if applicable (channel/person) */ 47 /* Return the CTCP destination if applicable (channel/person) */
46 QString ctcpDestination(); 48 QString ctcpDestination();
47 /* Return the IRC command (numerical commands) */ 49 /* Return the IRC command (numerical commands) */
48 unsigned short commandNumber(); 50 unsigned short commandNumber();
49 /* Return the trailing parameter string */ 51 /* Return the trailing parameter string */
50 QString trailing(); 52 QString trailing();
51 /* Return the complete parameter string */ 53 /* Return the complete parameter string */
52 QString allParameters(); 54 QString allParameters();
53 /* Return one parameter */ 55 /* Return one parameter */
54 QString param(int param); 56 QString param(int param);
55 /* Return some parameters */ 57 /* Return some parameters */
56 QStringList params(const QString &paramstring) const; 58 QStringList params(const QString &paramstring) const;
57protected: 59protected:
58 QString m_prefix; 60 QString m_prefix;
59 QString m_command; 61 QString m_command;
60 QString m_ctcpCommand; 62 QString m_ctcpCommand;
61 QString m_ctcpDestination; 63 QString m_ctcpDestination;
62 unsigned short m_commandNumber; 64 unsigned short m_commandNumber;
63 QString m_allParameters; 65 QString m_allParameters;
64 QString m_trailing; 66 QString m_trailing;
65 QStringList m_parameters; 67 QStringList m_parameters;
66 bool m_isNumerical; 68 bool m_isNumerical;
67 bool m_ctcp; 69 bool m_ctcp;
70 bool m_ctcpRequest;
68}; 71};
69 72
70#endif 73#endif