ircctcpparser.h
1 #ifndef id14670887_AF0E_4EAD_9A495B9E413C6723
2 #define id14670887_AF0E_4EAD_9A495B9E413C6723
3 
4 #include "dptr.h"
5 
6 #include <QObject>
7 #include <QString>
8 
10 
11 class IRCCtcpParser : public QObject
12 {
13  Q_OBJECT
14 
15  public:
16  enum CtcpEcho
17  {
18  PrintAsNormalMessage,
19  DisplayInServerTab,
20  DisplayThroughGlobalMessage,
21  DontShow
22  };
23 
25  {
34  };
35 
36  IRCCtcpParser(IRCNetworkAdapter *network, const QString &sender,
37  const QString &recipient, const QString &msg, MessageType msgType);
38  ~IRCCtcpParser();
39 
40  CtcpEcho echo() const;
41  bool parse();
42  const QString &printable() const;
43  const QString &reply() const;
44 
45  private:
47 
48  bool isCommand(const QString &candidate);
49  bool isCtcp() const;
53  void tokenizeMsg();
54  QString typeToName() const;
55 };
56 
57 
58 #endif
Interprets communication between the client and the IRC server.
An answer is being sent through NOTICE.
Definition: ircctcpparser.h:33
A question is being asked through PRIVMSG.
Definition: ircctcpparser.h:29