mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Remove JOINs from write connection (#3112)
Co-authored-by: zneix <zneix@zneix.eu>
This commit is contained in:
parent
95044efeed
commit
28dcdb238b
3 changed files with 4 additions and 37 deletions
|
@ -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: 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: 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: 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 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)
|
- Minor: Received IRC messages use `time` message tag for timestamp if it's available. (#3021)
|
||||||
|
|
|
@ -214,11 +214,6 @@ ChannelPtr AbstractIrcServer::getOrAddChannel(const QString &dirtyChannelName)
|
||||||
{
|
{
|
||||||
this->readConnection_->sendRaw("PART #" + channelName);
|
this->readConnection_->sendRaw("PART #" + channelName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->writeConnection_ && this->hasSeparateWriteConnection())
|
|
||||||
{
|
|
||||||
this->writeConnection_->sendRaw("PART #" + channelName);
|
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// join irc channel
|
// join irc channel
|
||||||
|
@ -232,14 +227,6 @@ ChannelPtr AbstractIrcServer::getOrAddChannel(const QString &dirtyChannelName)
|
||||||
this->readConnection_->sendRaw("JOIN #" + channelName);
|
this->readConnection_->sendRaw("JOIN #" + channelName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->writeConnection_ && this->hasSeparateWriteConnection())
|
|
||||||
{
|
|
||||||
if (this->readConnection_->isConnected())
|
|
||||||
{
|
|
||||||
this->writeConnection_->sendRaw("JOIN #" + channelName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return chan;
|
return chan;
|
||||||
|
|
|
@ -197,34 +197,13 @@ void TwitchIrcServer::writeConnectionMessageReceived(
|
||||||
// Below commands enabled through the twitch.tv/commands CAP REQ
|
// Below commands enabled through the twitch.tv/commands CAP REQ
|
||||||
if (command == "USERSTATE")
|
if (command == "USERSTATE")
|
||||||
{
|
{
|
||||||
// Received USERSTATE upon PRIVMSGing
|
// Received USERSTATE upon sending PRIVMSG messages
|
||||||
handler.handleUserStateMessage(message);
|
handler.handleUserStateMessage(message);
|
||||||
}
|
}
|
||||||
else if (command == "NOTICE")
|
else if (command == "NOTICE")
|
||||||
{
|
{
|
||||||
static std::unordered_set<std::string> readConnectionOnlyIDs{
|
// List of expected NOTICE messages on write connection
|
||||||
"host_on",
|
// https://git.kotmisia.pl/Mm2PL/docs/src/branch/master/irc_msg_ids.md#command-results
|
||||||
"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",
|
|
||||||
};
|
|
||||||
|
|
||||||
handler.handleNoticeMessage(
|
handler.handleNoticeMessage(
|
||||||
static_cast<Communi::IrcNoticeMessage *>(message));
|
static_cast<Communi::IrcNoticeMessage *>(message));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue