This commit is contained in:
Hri7566 2021-04-13 17:36:41 -04:00
parent fa5dc72998
commit c0f414cdb1
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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());