diff options
author | louiz’ <louiz@louiz.org> | 2020-08-16 15:51:47 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2020-08-16 16:03:11 +0200 |
commit | df2fe0bc4bf6240e47abf26ff88ffdfc9373f481 (patch) | |
tree | 9c5ca41075261faf6f377c6fa6ac2ff6d659266d /src/irc/irc_message.hpp | |
parent | 063e6b127ecf92ca5bf8c4ecb137b60e3e7aa216 (diff) | |
download | biboumi-df2fe0bc4bf6240e47abf26ff88ffdfc9373f481.tar.gz biboumi-df2fe0bc4bf6240e47abf26ff88ffdfc9373f481.tar.bz2 biboumi-df2fe0bc4bf6240e47abf26ff88ffdfc9373f481.tar.xz biboumi-df2fe0bc4bf6240e47abf26ff88ffdfc9373f481.zip |
Fix the parsing of IRC messages, especially with trailing spaces
Diffstat (limited to 'src/irc/irc_message.hpp')
-rw-r--r-- | src/irc/irc_message.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/irc/irc_message.hpp b/src/irc/irc_message.hpp index 269a12a..5475fd2 100644 --- a/src/irc/irc_message.hpp +++ b/src/irc/irc_message.hpp @@ -4,11 +4,13 @@ #include <vector> #include <string> #include <ostream> +#include <sstream> class IrcMessage { public: - IrcMessage(std::string&& line); + IrcMessage(std::stringstream ss); + IrcMessage(std::string str): IrcMessage{std::stringstream{str}} {} IrcMessage(std::string&& prefix, std::string&& command, std::vector<std::string>&& args); IrcMessage(std::string&& command, std::vector<std::string>&& args); ~IrcMessage() = default; |