summaryrefslogtreecommitdiff
path: root/src/libirc/irc_message.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libirc/irc_message.hpp')
-rw-r--r--src/libirc/irc_message.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libirc/irc_message.hpp b/src/libirc/irc_message.hpp
new file mode 100644
index 0000000..a0bd772
--- /dev/null
+++ b/src/libirc/irc_message.hpp
@@ -0,0 +1,28 @@
+#ifndef IRC_MESSAGE_INCLUDED
+# define IRC_MESSAGE_INCLUDED
+
+#include <vector>
+#include <string>
+#include <ostream>
+
+class IrcMessage
+{
+public:
+ explicit IrcMessage(std::string&& line);
+ explicit IrcMessage(std::string&& prefix, std::string&& command, std::vector<std::string>&& args);
+ explicit IrcMessage(std::string&& command, std::vector<std::string>&& args);
+ ~IrcMessage();
+
+ std::string prefix;
+ std::string command;
+ std::vector<std::string> arguments;
+
+ IrcMessage(const IrcMessage&) = delete;
+ IrcMessage(IrcMessage&&) = delete;
+ IrcMessage& operator=(const IrcMessage&) = delete;
+ IrcMessage& operator=(IrcMessage&&) = delete;
+};
+
+std::ostream& operator<<(std::ostream& os, const IrcMessage& message);
+
+#endif // IRC_MESSAGE_INCLUDED