move more handlers from write to read

This commit is contained in:
Rasmus Karlsson 2019-09-21 11:56:37 +02:00
parent d94be74007
commit 137d7910c0

View file

@ -170,6 +170,23 @@ void TwitchIrcServer::readConnectionMessageReceived(
{ {
handler.handleClearChatMessage(message); handler.handleClearChatMessage(message);
} }
else if (command == "CLEARMSG")
{
handler.handleClearMessageMessage(message);
}
else if (command == "USERNOTICE")
{
handler.handleUserNoticeMessage(message, *this);
}
else if (command == "NOTICE")
{
handler.handleNoticeMessage(
static_cast<Communi::IrcNoticeMessage *>(message));
}
else if (command == "WHISPER")
{
handler.handleWhisperMessage(message);
}
} }
void TwitchIrcServer::writeConnectionMessageReceived( void TwitchIrcServer::writeConnectionMessageReceived(
@ -185,27 +202,6 @@ void TwitchIrcServer::writeConnectionMessageReceived(
// Received USERSTATE upon PRIVMSGing // Received USERSTATE upon PRIVMSGing
handler.handleUserStateMessage(message); handler.handleUserStateMessage(message);
} }
else if (command == "WHISPER")
{
handler.handleWhisperMessage(message);
}
else if (command == "USERNOTICE")
{
handler.handleUserNoticeMessage(message, *this);
}
else if (command == "ROOMSTATE")
{
handler.handleRoomStateMessage(message);
}
else if (command == "CLEARMSG")
{
handler.handleClearMessageMessage(message);
}
else if (command == "NOTICE")
{
handler.handleNoticeMessage(
static_cast<Communi::IrcNoticeMessage *>(message));
}
} }
void TwitchIrcServer::onReadConnected(IrcConnection *connection) void TwitchIrcServer::onReadConnected(IrcConnection *connection)