summaryrefslogtreecommitdiff
path: root/src/irc/irc_message.hpp
blob: 29ed94610e0acfdc1113def9e2a64743edfd370e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef IRC_MESSAGE_INCLUDED
# define IRC_MESSAGE_INCLUDED

#include <vector>
#include <string>
#include <ostream>

class IrcMessage
{
public:
  IrcMessage(std::string&& line);
  IrcMessage(std::string&& prefix, std::string&& command, std::vector<std::string>&& args);
  IrcMessage(std::string&& command, std::vector<std::string>&& args);
  ~IrcMessage() = default;

  IrcMessage(const IrcMessage&) = delete;
  IrcMessage(IrcMessage&&) = delete;
  IrcMessage& operator=(const IrcMessage&) = delete;
  IrcMessage& operator=(IrcMessage&&) = delete;

  std::string prefix;
  std::string command;
  std::vector<std::string> arguments;
};

std::ostream& operator<<(std::ostream& os, const IrcMessage& message);

#endif // IRC_MESSAGE_INCLUDED