From 9af94993d22e852f8caff0301d816efa24ca7ce1 Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Tue, 13 Apr 2021 17:36:41 -0400 Subject: [PATCH] these --- src/Message.js | 2 +- src/Room.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Message.js b/src/Message.js index fa65ea3..a1ccef2 100644 --- a/src/Message.js +++ b/src/Message.js @@ -190,7 +190,7 @@ module.exports = (cl) => { if(!cl.quotas.userset.attempt()) return; cl.user.name = msg.set.name; let user = new User(cl); - Database.getUserData().then((usr) => { + Database.getUserData(cl, cl.server).then((usr) => { let dbentry = user.userdb.get(cl.user._id); if (!dbentry) return; dbentry.name = msg.set.name; diff --git a/src/Room.js b/src/Room.js index 101ad23..924c15d 100644 --- a/src/Room.js +++ b/src/Room.js @@ -129,7 +129,9 @@ class Room extends EventEmitter { } this.connections.forEach((usr) => { - this.server.connections.get(usr.connectionid).sendArray([this.fetchData(usr, cl)]) + let u = this.fetchData(usr, cl); + u.ip = undefined; + this.server.connections.get(usr.connectionid).sendArray([u]) }); this.server.updateRoom(this.fetchData());