mirror of
https://github.com/DerTyp7/teamspeak-obs-overlay.git
synced 2025-10-30 05:07:12 +01:00
added more multi server stability
This commit is contained in:
@@ -59,7 +59,6 @@ function main() {
|
|||||||
console.log("Disconnected");
|
console.log("Disconnected");
|
||||||
clientList.clear();
|
clientList.clear();
|
||||||
channelList.clear();
|
channelList.clear();
|
||||||
console.log(clientList);
|
|
||||||
drawClients();
|
drawClients();
|
||||||
main(); // Reconnected
|
main(); // Reconnected
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ function handleClientMoved(data) {
|
|||||||
data.payload.newChannelId
|
data.payload.newChannelId
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
console.log(data.payload);
|
||||||
// New Client has to be created
|
// New Client has to be created
|
||||||
clientList.add(
|
clientList.add(
|
||||||
new Client(
|
new Client(
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ function getClientsInChannel(channel) {
|
|||||||
let result = [];
|
let result = [];
|
||||||
|
|
||||||
clientList.items.forEach((e) => {
|
clientList.items.forEach((e) => {
|
||||||
if (e.channel.id == channel.id) {
|
if (e.channel) {
|
||||||
result.push(e);
|
if (e.channel.id == channel.id) {
|
||||||
|
result.push(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user