Change the stream that tourney match chat joining uses
This commit is contained in:
parent
02ae0846e2
commit
185ef7fd2b
2 changed files with 8 additions and 8 deletions
|
@ -12,14 +12,14 @@ module.exports = function(CurrentUser, MatchID) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global.StreamsHandler.isUserInStream(match.matchStreamName, CurrentUser.uuid))
|
if (global.StreamsHandler.isUserInStream(match.matchChatStreamName, CurrentUser.uuid))
|
||||||
return global.consoleHelper.printBancho(`Did not add user to channel ${match.matchStreamName} because they are already in it`);
|
return global.consoleHelper.printBancho(`Did not add user to channel ${match.matchChatStreamName} because they are already in it`);
|
||||||
|
|
||||||
const osuPacketWriter = new osu.Bancho.Writer;
|
const osuPacketWriter = new osu.Bancho.Writer;
|
||||||
|
|
||||||
osuPacketWriter.ChannelJoinSuccess("#multiplayer");
|
osuPacketWriter.ChannelJoinSuccess("#multiplayer");
|
||||||
if (!global.StreamsHandler.isUserInStream(match.matchStreamName, CurrentUser.uuid))
|
if (!global.StreamsHandler.isUserInStream(match.matchChatStreamName, CurrentUser.uuid))
|
||||||
global.StreamsHandler.addUserToStream(match.matchStreamName, CurrentUser.uuid);
|
global.StreamsHandler.addUserToStream(match.matchChatStreamName, CurrentUser.uuid);
|
||||||
|
|
||||||
CurrentUser.addActionToQueue(osuPacketWriter.toBuffer);
|
CurrentUser.addActionToQueue(osuPacketWriter.toBuffer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,14 +8,14 @@ module.exports = function(CurrentUser, MatchID) {
|
||||||
match.isTourneyMatch = false;
|
match.isTourneyMatch = false;
|
||||||
match.tourneyClientUsers = [];
|
match.tourneyClientUsers = [];
|
||||||
|
|
||||||
if (global.StreamsHandler.isUserInStream(match.matchStreamName, CurrentUser.uuid))
|
if (global.StreamsHandler.isUserInStream(match.matchChatStreamName, CurrentUser.uuid))
|
||||||
return global.consoleHelper.printBancho(`Did not add user to channel ${match.matchStreamName} because they are already in it`);
|
return global.consoleHelper.printBancho(`Did not add user to channel ${match.matchChatStreamName} because they are already in it`);
|
||||||
|
|
||||||
const osuPacketWriter = new osu.Bancho.Writer;
|
const osuPacketWriter = new osu.Bancho.Writer;
|
||||||
|
|
||||||
osuPacketWriter.ChannelRevoked("#multiplayer");
|
osuPacketWriter.ChannelRevoked("#multiplayer");
|
||||||
if (!global.StreamsHandler.isUserInStream(match.matchStreamName, CurrentUser.uuid))
|
if (!global.StreamsHandler.isUserInStream(match.matchChatStreamName, CurrentUser.uuid))
|
||||||
global.StreamsHandler.removeUserFromStream(match.matchStreamName, CurrentUser.uuid);
|
global.StreamsHandler.removeUserFromStream(match.matchChatStreamName, CurrentUser.uuid);
|
||||||
|
|
||||||
CurrentUser.addActionToQueue(osuPacketWriter.toBuffer);
|
CurrentUser.addActionToQueue(osuPacketWriter.toBuffer);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue