This commit is contained in:
Hri7566 2021-04-13 17:44:28 -04:00
parent 6da7438f8e
commit ae1cc86e45
2 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ module.exports = (cl) => {
if(!cl.quotas.userset.attempt()) return; if(!cl.quotas.userset.attempt()) return;
cl.user.name = msg.set.name; cl.user.name = msg.set.name;
let user = new User(cl); let user = new User(cl);
Database.getUserData(cl, cl.server).then((usr) => { Database.getUserData().then((usr) => {
let dbentry = user.userdb.get(cl.user._id); let dbentry = user.userdb.get(cl.user._id);
if (!dbentry) return; if (!dbentry) return;
dbentry.name = msg.set.name; dbentry.name = msg.set.name;

View File

@ -3,7 +3,7 @@ const Database = require("./Database");
class User { class User {
constructor(cl, data) { constructor(cl, data) {
this.server = cl.server; this.server = cl.server;
this.name = typeof(data.name) == 'string' ? data.name : "Anonymous"; this.name = data.name;
this._id = data._id; this._id = data._id;
this.color = data.color; this.color = data.color;
this.ip = data.ip; this.ip = data.ip;