Make offline UUIDs consistent with vanilla. (#4178)
Fixes #4177 This is a breaking change to existing Cuberite permissions settings.
This commit is contained in:
@@ -273,11 +273,9 @@ cUUID cClientHandle::GenerateOfflineUUID(const AString & a_Username)
|
||||
// Online UUIDs are always version 4 (random)
|
||||
// We use Version 3 (MD5 hash) UUIDs for the offline UUIDs
|
||||
// This guarantees that they will never collide with an online UUID and can be distinguished.
|
||||
// This is also consistent with the vanilla offline UUID scheme.
|
||||
|
||||
// First make the username lowercase:
|
||||
AString lcUsername = StrToLower(a_Username);
|
||||
|
||||
return cUUID::GenerateVersion3(lcUsername);
|
||||
return cUUID::GenerateVersion3("OfflinePlayer:" + a_Username);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user