Disconnect Twitch chat and event connection on plugin stop
Some checks failed
debian-build / build (push) Has been cancelled
Push to master / Check Formatting 🔍 (push) Has been cancelled
Push to master / Build Project 🧱 (push) Has been cancelled
Push to master / Create Release 🛫 (push) Has been cancelled

This commit is contained in:
WarmUpTill
2026-06-01 20:13:00 +02:00
committed by WarmUpTill
parent 1ce332a91d
commit ed17c2ac6d
5 changed files with 47 additions and 7 deletions

View File

@@ -547,16 +547,18 @@ bool MacroConditionTwitch::CheckChatMessageRemove(TwitchToken &token)
bool MacroConditionTwitch::ChatConnectionIsSetup(TwitchToken &token)
{
if (_chatConnection) {
_chatConnection->ConnectToChat();
return true;
}
_chatConnection =
TwitchChatConnection::GetChatConnection(token, _channel);
if (!_chatConnection) {
_chatConnection = TwitchChatConnection::GetChatConnection(
token, _channel);
if (!_chatConnection) {
return false;
}
_chatBuffer = _chatConnection->RegisterForMessages();
return false;
}
return true;
_chatBuffer = _chatConnection->RegisterForMessages();
return false;
}
bool MacroConditionTwitch::HandleChatEvents(