Browse Source

bug #1915: Fixed noit being able to log yourself out if you are in an instanced zone

tags/v0.11.0
Shaun 2 years ago
parent
commit
4646f86635
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      src/server/security/connections.js
  2. +2
    -2
      src/server/world/atlas.js

+ 2
- 2
src/server/security/connections.js View File

@@ -129,8 +129,8 @@ module.exports = {
continue;

if (p.auth.username === exclude.auth.username) {
if (p.name && p.zoneName)
await atlas.forceSavePlayer(p.name, p.zoneName);
if (p.name && p.zoneId)
await atlas.forceSavePlayer(p.name, p.zoneId);

p.socket.emit('dc', {});
}


+ 2
- 2
src/server/world/atlas.js View File

@@ -314,8 +314,8 @@ module.exports = {
});
},

forceSavePlayer: async function (playerName, zoneName) {
const thread = this.getThreadFromName(zoneName);
forceSavePlayer: async function (playerName, zoneId) {
const thread = this.threads.find(t => t.id === zoneId);

if (!thread)
return;


Loading…
Cancel
Save