From ae1cc86e4524041740e1f84dbc37216c3310dfb9 Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Tue, 13 Apr 2021 17:44:28 -0400 Subject: [PATCH] fix? --- src/Message.js | 2 +- src/User.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Message.js b/src/Message.js index a1ccef2..fa65ea3 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(cl, cl.server).then((usr) => { + Database.getUserData().then((usr) => { let dbentry = user.userdb.get(cl.user._id); if (!dbentry) return; dbentry.name = msg.set.name; diff --git a/src/User.js b/src/User.js index 0c3edd4..61a8a66 100644 --- a/src/User.js +++ b/src/User.js @@ -3,7 +3,7 @@ const Database = require("./Database"); class User { constructor(cl, data) { this.server = cl.server; - this.name = typeof(data.name) == 'string' ? data.name : "Anonymous"; + this.name = data.name; this._id = data._id; this.color = data.color; this.ip = data.ip;