Skip to content

Commit

Permalink
Users: Don't merge unregistered names across IPs
Browse files Browse the repository at this point in the history
Fixes #7594
  • Loading branch information
AnnikaCodes committed Oct 30, 2020
1 parent 42f491a commit 1d9c24c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ export class User extends Chat.MessageContext {

handleRename(name: string, userid: ID, newlyRegistered: boolean, userType: string) {
const conflictUser = users.get(userid);
if (conflictUser && !conflictUser.registered && conflictUser.connected) {
if (conflictUser && !conflictUser.registered && (conflictUser.latestIp !== this.latestIp || conflictUser.connected)) {
if (newlyRegistered && userType !== '1') {
if (conflictUser !== this) conflictUser.resetName();
} else {
Expand Down

0 comments on commit 1d9c24c

Please sign in to comment.