diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c1f4762b..533ab79b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Major: Newly uploaded Twitch emotes are once again present in emote picker and can be autocompleted with Tab as well. (#2992) - Major: Added the ability to add nicknames for users. (#137, #2981) +- Major: Work on rate-limiting JOINs and PARTs. (#3112) - Minor: Added autocompletion in /whispers for Twitch emotes, Global Bttv/Ffz emotes and emojis. (#2999, #3033) - Minor: Received Twitch messages now use the exact same timestamp (obtained from Twitch's server) for every Chatterino user instead of assuming message timestamp on client's side. (#3021) - Minor: Received IRC messages use `time` message tag for timestamp if it's available. (#3021) diff --git a/src/providers/irc/AbstractIrcServer.cpp b/src/providers/irc/AbstractIrcServer.cpp index be9fc4f88..3dfb657cd 100644 --- a/src/providers/irc/AbstractIrcServer.cpp +++ b/src/providers/irc/AbstractIrcServer.cpp @@ -214,11 +214,6 @@ ChannelPtr AbstractIrcServer::getOrAddChannel(const QString &dirtyChannelName) { this->readConnection_->sendRaw("PART #" + channelName); } - - if (this->writeConnection_ && this->hasSeparateWriteConnection()) - { - this->writeConnection_->sendRaw("PART #" + channelName); - } })); // join irc channel @@ -232,14 +227,6 @@ ChannelPtr AbstractIrcServer::getOrAddChannel(const QString &dirtyChannelName) this->readConnection_->sendRaw("JOIN #" + channelName); } } - - if (this->writeConnection_ && this->hasSeparateWriteConnection()) - { - if (this->readConnection_->isConnected()) - { - this->writeConnection_->sendRaw("JOIN #" + channelName); - } - } } return chan; diff --git a/src/providers/twitch/TwitchIrcServer.cpp b/src/providers/twitch/TwitchIrcServer.cpp index 3aede1400..8a0aa1642 100644 --- a/src/providers/twitch/TwitchIrcServer.cpp +++ b/src/providers/twitch/TwitchIrcServer.cpp @@ -197,34 +197,13 @@ void TwitchIrcServer::writeConnectionMessageReceived( // Below commands enabled through the twitch.tv/commands CAP REQ if (command == "USERSTATE") { - // Received USERSTATE upon PRIVMSGing + // Received USERSTATE upon sending PRIVMSG messages handler.handleUserStateMessage(message); } else if (command == "NOTICE") { - static std::unordered_set readConnectionOnlyIDs{ - "host_on", - "host_off", - "host_target_went_offline", - "emote_only_on", - "emote_only_off", - "slow_on", - "slow_off", - "subs_on", - "subs_off", - "r9k_on", - "r9k_off", - - // Display for user who times someone out. This implies you're a - // moderator, at which point you will be connected to PubSub and receive - // a better message from there. - "timeout_success", - "ban_success", - - // Channel suspended notices - "msg_channel_suspended", - }; - + // List of expected NOTICE messages on write connection + // https://git.kotmisia.pl/Mm2PL/docs/src/branch/master/irc_msg_ids.md#command-results handler.handleNoticeMessage( static_cast(message)); }