fix "name" admin message
This commit is contained in:
parent
75002ec47d
commit
b7a4f511b4
|
@ -387,17 +387,14 @@ module.exports = (cl) => {
|
|||
if (!msg.hasOwnProperty('_id')) return;
|
||||
if (!msg.hasOwnProperty('name')) return;
|
||||
|
||||
let c;
|
||||
|
||||
for (const conn of cl.server.connections) {
|
||||
for (const [mapID, conn] of cl.server.connections) {
|
||||
if (!conn.user) return;
|
||||
if (conn.user._id == msg._id) {
|
||||
c = conn;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!c) return;
|
||||
|
||||
let c = conn;
|
||||
c.userset(msg.name, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
@ -88,7 +88,8 @@ class Server extends EventEmitter {
|
|||
"unsubscribe from admin stream",
|
||||
"data",
|
||||
"channel message",
|
||||
"channel_flag"
|
||||
"channel_flag",
|
||||
"name"
|
||||
];
|
||||
|
||||
this.welcome_motd = config.motd || "You agree to read this message.";
|
||||
|
|
Loading…
Reference in New Issue