Change the stream that tourney match chat joining uses

This commit is contained in:
Ethan Stubbs 2021-02-06 01:27:43 +00:00
parent 02ae0846e2
commit 185ef7fd2b
2 changed files with 8 additions and 8 deletions

View file

@ -12,14 +12,14 @@ module.exports = function(CurrentUser, MatchID) {
}
}
if (global.StreamsHandler.isUserInStream(match.matchStreamName, CurrentUser.uuid))
return global.consoleHelper.printBancho(`Did not add user to channel ${match.matchStreamName} because they are already in it`);
if (global.StreamsHandler.isUserInStream(match.matchChatStreamName, CurrentUser.uuid))
return global.consoleHelper.printBancho(`Did not add user to channel ${match.matchChatStreamName} because they are already in it`);
const osuPacketWriter = new osu.Bancho.Writer;
osuPacketWriter.ChannelJoinSuccess("#multiplayer");
if (!global.StreamsHandler.isUserInStream(match.matchStreamName, CurrentUser.uuid))
global.StreamsHandler.addUserToStream(match.matchStreamName, CurrentUser.uuid);
if (!global.StreamsHandler.isUserInStream(match.matchChatStreamName, CurrentUser.uuid))
global.StreamsHandler.addUserToStream(match.matchChatStreamName, CurrentUser.uuid);
CurrentUser.addActionToQueue(osuPacketWriter.toBuffer);
}

View file

@ -8,14 +8,14 @@ module.exports = function(CurrentUser, MatchID) {
match.isTourneyMatch = false;
match.tourneyClientUsers = [];
if (global.StreamsHandler.isUserInStream(match.matchStreamName, CurrentUser.uuid))
return global.consoleHelper.printBancho(`Did not add user to channel ${match.matchStreamName} because they are already in it`);
if (global.StreamsHandler.isUserInStream(match.matchChatStreamName, CurrentUser.uuid))
return global.consoleHelper.printBancho(`Did not add user to channel ${match.matchChatStreamName} because they are already in it`);
const osuPacketWriter = new osu.Bancho.Writer;
osuPacketWriter.ChannelRevoked("#multiplayer");
if (!global.StreamsHandler.isUserInStream(match.matchStreamName, CurrentUser.uuid))
global.StreamsHandler.removeUserFromStream(match.matchStreamName, CurrentUser.uuid);
if (!global.StreamsHandler.isUserInStream(match.matchChatStreamName, CurrentUser.uuid))
global.StreamsHandler.removeUserFromStream(match.matchChatStreamName, CurrentUser.uuid);
CurrentUser.addActionToQueue(osuPacketWriter.toBuffer);
} else {