Disallow BinatoStream from creating duplicate streams
This commit is contained in:
parent
e9fd3993a8
commit
9d5790b2c7
2 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,6 @@ An implementation of osu!bancho in Javascript
|
|||
|
||||
## Bugs:
|
||||
- If a client clicks the plus button in the chat window to join another channel the client will "crash", the game will keep running but the user will be unable to do anything
|
||||
- BinatoStream can create duplicate streams
|
||||
|
||||
## How to connect:
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@ module.exports = class {
|
|||
}
|
||||
|
||||
addStream(streamName, removeIfEmpty, spectatorHostId = null) {
|
||||
const streamNames = Object.keys(this.avaliableStreams);
|
||||
if (streamNames.includes(streamName)) return global.consoleHelper.printBancho(`Did not add stream [${streamName}] A stream with the same name already exists`);
|
||||
// Add new stream to the list of streams
|
||||
this.avaliableStreams[streamName] = {
|
||||
streamUsers: [], // An array containing a list of user IDs of the users in a given stream
|
||||
|
|
Loading…
Reference in a new issue