2018-02-05 15:11:50 +01:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-09 22:26:14 +02:00
|
|
|
#include "common/Channel.hpp"
|
2019-09-17 12:10:38 +02:00
|
|
|
#include "common/ChannelChatters.hpp"
|
2019-09-09 22:26:14 +02:00
|
|
|
|
2018-02-05 15:11:50 +01:00
|
|
|
namespace chatterino {
|
2018-06-26 16:37:59 +02:00
|
|
|
|
2019-09-10 14:46:43 +02:00
|
|
|
class Irc;
|
|
|
|
class IrcServer;
|
|
|
|
|
2019-09-17 12:10:38 +02:00
|
|
|
class IrcChannel : public Channel, public ChannelChatters
|
2019-09-09 22:26:14 +02:00
|
|
|
{
|
|
|
|
public:
|
2019-09-10 14:46:43 +02:00
|
|
|
explicit IrcChannel(const QString &name, IrcServer *server);
|
|
|
|
|
|
|
|
void sendMessage(const QString &message) override;
|
|
|
|
|
2019-09-14 18:38:09 +02:00
|
|
|
// server may be nullptr
|
2019-09-10 14:46:43 +02:00
|
|
|
IrcServer *server();
|
|
|
|
|
2019-09-18 08:05:51 +02:00
|
|
|
// Channel methods
|
|
|
|
virtual bool canReconnect() const override;
|
|
|
|
virtual void reconnect() override;
|
|
|
|
|
2019-09-10 14:46:43 +02:00
|
|
|
private:
|
|
|
|
void setServer(IrcServer *server);
|
|
|
|
|
|
|
|
IrcServer *server_;
|
|
|
|
|
|
|
|
friend class Irc;
|
2019-09-09 22:26:14 +02:00
|
|
|
};
|
|
|
|
|
2018-02-05 15:11:50 +01:00
|
|
|
} // namespace chatterino
|