2018-01-01 23:54:54 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <IrcMessage>
|
|
|
|
|
|
|
|
namespace chatterino {
|
2018-03-25 11:37:57 +02:00
|
|
|
|
2018-06-04 12:23:23 +02:00
|
|
|
class TwitchServer;
|
|
|
|
|
2018-01-01 23:54:54 +01:00
|
|
|
class IrcMessageHandler
|
|
|
|
{
|
2018-04-14 21:59:51 +02:00
|
|
|
IrcMessageHandler() = default;
|
2018-01-01 23:54:54 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
static IrcMessageHandler &getInstance();
|
|
|
|
|
2018-06-04 12:23:23 +02:00
|
|
|
void handlePrivMessage(Communi::IrcPrivateMessage *message, TwitchServer &server);
|
|
|
|
|
2018-01-01 23:54:54 +01:00
|
|
|
void handleRoomStateMessage(Communi::IrcMessage *message);
|
|
|
|
void handleClearChatMessage(Communi::IrcMessage *message);
|
|
|
|
void handleUserStateMessage(Communi::IrcMessage *message);
|
|
|
|
void handleWhisperMessage(Communi::IrcMessage *message);
|
2018-06-04 12:23:23 +02:00
|
|
|
void handleUserNoticeMessage(Communi::IrcMessage *message, TwitchServer &server);
|
2018-01-01 23:54:54 +01:00
|
|
|
void handleModeMessage(Communi::IrcMessage *message);
|
|
|
|
void handleNoticeMessage(Communi::IrcNoticeMessage *message);
|
|
|
|
void handleWriteConnectionNoticeMessage(Communi::IrcNoticeMessage *message);
|
2018-05-26 18:06:55 +02:00
|
|
|
|
|
|
|
void handleJoinMessage(Communi::IrcMessage *message);
|
|
|
|
void handlePartMessage(Communi::IrcMessage *message);
|
2018-06-04 12:23:23 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void addMessage(Communi::IrcMessage *message, const QString &target, const QString &content,
|
2018-06-07 15:49:24 +02:00
|
|
|
TwitchServer &server, bool isResub, bool isAction);
|
2018-01-01 23:54:54 +01:00
|
|
|
};
|
2018-03-25 11:37:57 +02:00
|
|
|
|
2018-02-05 15:11:50 +01:00
|
|
|
} // namespace chatterino
|