refactored irc

This commit is contained in:
fourtf
2018-02-05 15:11:50 +01:00
parent 12b30eb2ed
commit b351c40d29
56 changed files with 1397 additions and 1154 deletions
+35
View File
@@ -0,0 +1,35 @@
#pragma once
#include <memory>
#include "providers/irc/abstractircserver.hpp"
#include "providers/twitch/twitchaccount.hpp"
#include "providers/twitch/twitchchannel.hpp"
namespace chatterino {
namespace providers {
namespace twitch {
class TwitchServer final : public irc::AbstractIrcServer
{
TwitchServer();
public:
static TwitchServer &getInstance();
const ChannelPtr whispersChannel;
const ChannelPtr mentionsChannel;
protected:
virtual void initializeConnection(Communi::IrcConnection *connection, bool isRead,
bool isWrite) override;
virtual std::shared_ptr<Channel> createChannel(const QString &channelName) override;
virtual void privateMessageReceived(Communi::IrcPrivateMessage *message) override;
virtual void messageReceived(Communi::IrcMessage *message) override;
virtual void writeConnectionMessageReceived(Communi::IrcMessage *message) override;
virtual std::shared_ptr<Channel> getCustomChannel(const QString &channelname) override;
};
} // namespace twitch
} // namespace providers
} // namespace chatterino