summaryrefslogtreecommitdiff
path: root/src/irc/irc_channel.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-10-05 00:17:22 +0200
committerlouiz’ <louiz@louiz.org>2016-10-05 00:18:22 +0200
commit3620d533ee88a8804317d2745320c0186192ddaa (patch)
tree9ef94df31a26691a7e259e7242931b95b45808a2 /src/irc/irc_channel.hpp
parent55daa3e61c04946500c4106cfca7413b6e243435 (diff)
downloadbiboumi-3620d533ee88a8804317d2745320c0186192ddaa.tar.gz
biboumi-3620d533ee88a8804317d2745320c0186192ddaa.tar.bz2
biboumi-3620d533ee88a8804317d2745320c0186192ddaa.tar.xz
biboumi-3620d533ee88a8804317d2745320c0186192ddaa.zip
Avoid sending PART command for unjoined channels
fix #3205
Diffstat (limited to 'src/irc/irc_channel.hpp')
-rw-r--r--src/irc/irc_channel.hpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/irc/irc_channel.hpp b/src/irc/irc_channel.hpp
index 2bcefaf..7c269b9 100644
--- a/src/irc/irc_channel.hpp
+++ b/src/irc/irc_channel.hpp
@@ -14,16 +14,19 @@
class IrcChannel
{
public:
- explicit IrcChannel();
+ IrcChannel() = default;
IrcChannel(const IrcChannel&) = delete;
IrcChannel(IrcChannel&&) = delete;
IrcChannel& operator=(const IrcChannel&) = delete;
IrcChannel& operator=(IrcChannel&&) = delete;
- bool joined;
- std::string topic;
- std::string topic_author;
+ bool joined{false};
+ // Set to true if we sent a PART but didn’t yet receive the PART ack from
+ // the server
+ bool parting{false};
+ std::string topic{};
+ std::string topic_author{};
void set_self(const std::string& name);
IrcUser* get_self() const;
IrcUser* add_user(const std::string& name,
@@ -35,8 +38,8 @@ public:
{ return this->users; }
protected:
- std::unique_ptr<IrcUser> self;
- std::vector<std::unique_ptr<IrcUser>> users;
+ std::unique_ptr<IrcUser> self{};
+ std::vector<std::unique_ptr<IrcUser>> users{};
};
/**