Only send REQ-messages on read connection

This commit is contained in:
Rasmus Karlsson 2017-06-06 15:58:26 +02:00
parent 1a428a54d5
commit 6a5d4d49ee

View file

@ -76,9 +76,12 @@ Communi::IrcConnection *IrcManager::createConnection(bool doRead)
this->refreshTwitchEmotes(username, oauthClient, oauthToken);
connection->sendCommand(Communi::IrcCommand::createCapability("REQ", "twitch.tv/membership"));
connection->sendCommand(Communi::IrcCommand::createCapability("REQ", "twitch.tv/commands"));
connection->sendCommand(Communi::IrcCommand::createCapability("REQ", "twitch.tv/tags"));
if (doRead) {
connection->sendCommand(
Communi::IrcCommand::createCapability("REQ", "twitch.tv/membership"));
connection->sendCommand(Communi::IrcCommand::createCapability("REQ", "twitch.tv/commands"));
connection->sendCommand(Communi::IrcCommand::createCapability("REQ", "twitch.tv/tags"));
}
connection->setHost("irc.chat.twitch.tv");
connection->setPort(6667);