~singpolyma/biboumi

ref: 09b10cc80146c1ac2a0d5c53c6c8469b934189f2 biboumi/src/irc/irc_message.hpp -rw-r--r-- 665 bytes
09b10cc8 — louiz’ Throttle all commands sent to IRC servers 4 years ago
                                                                                
81f8f45b louiz’
7f580dbc Florent Le Coz
1f6eea62 Florent Le Coz
af420738 louiz’
7f580dbc Florent Le Coz
09b10cc8 louiz’
7f580dbc Florent Le Coz
09b10cc8 louiz’
af420738 louiz’
7f580dbc Florent Le Coz
81f8f45b louiz’
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
#pragma once


#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&&) = default;
  IrcMessage& operator=(const IrcMessage&) = delete;
  IrcMessage& operator=(IrcMessage&&) = default;

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

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