From 6a5d4d49ee481369004a29b9c5e0a6269e5def7c Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Tue, 6 Jun 2017 15:58:26 +0200 Subject: [PATCH] Only send REQ-messages on read connection --- src/ircmanager.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ircmanager.cpp b/src/ircmanager.cpp index ad8691b65..484b7452d 100644 --- a/src/ircmanager.cpp +++ b/src/ircmanager.cpp @@ -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);