Skip to content

Commit

Permalink
more logging XD
Browse files Browse the repository at this point in the history
  • Loading branch information
nol_an authored and nol_an committed Nov 8, 2019
1 parent 188cd03 commit c2ef860
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Intercom.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ class Intercom {
});

setInterval(() => {
console.log(this.servers);
}, 15000);
console.log(this.servers.first()._ping);
console.log(this.servers.first().lastPinged);
}, 5000);

}

Expand Down
1 change: 0 additions & 1 deletion endpoints/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class ServerEndpoint extends Endpoint {
version
});
this.client.intercom.servers.set(serverId, server);
console.log(`added new server: ${serverId}`);
}
server.update(players);
res.send({
Expand Down
4 changes: 2 additions & 2 deletions endpoints/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class UserEndpoint extends Endpoint {
// const infraction = await this.client.storageManager.tables.users.grabLatestBan(id);
// data.infraction = infraction;
// }

return res.send(data);
//
// return res.send(data);
}

}
Expand Down
3 changes: 2 additions & 1 deletion interfaces/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ class Server {
for(const player of players) {
let intercomPlayer = this.client.intercom.players.get(player.id);
if(intercomPlayer) {
console.log(`updating server for player: ${player.username}`); //eslint-disable-line no-console
console.log(`found existing player: ${player.username}`); //eslint-disable-line no-console
if(intercomPlayer.server.id !== this.id) { //update server if server doesnt match
console.log(`server updating for player: ${player.username}`); //eslint-disable-line no-console
intercomPlayer.server = this;
}
} else {
Expand Down

0 comments on commit c2ef860

Please sign in to comment.