mhf_alex should default to mhf_alex if skin not accessible

We only use the 'hard stored' mhf_alex skin when it's part of the 'default' query parameter.
In the rare event that mhf_alex is requested but the skin is not accessible, we would fall back to 'mhf_steve' because it's the default for usernames.
This commit adds the special case to use the stored version of the 'mhf_alex' skin when it's not accessible otherwise
This commit is contained in:
jomo 2016-01-20 00:56:20 +01:00
parent b9f6a21942
commit 8367c1e519

View File

@ -104,8 +104,12 @@ exp.resize_img = function(inname, size, callback) {
// returns "mhf_alex" or "mhf_steve" calculated by the +uuid+
exp.default_skin = function(uuid) {
if (uuid.length <= 16) {
if (uuid.toLowerCase() === "mhf_alex") {
return uuid;
} else {
// we can't get the skin type by username
return "mhf_steve";
}
} else {
// great thanks to Minecrell for research into Minecraft and Java's UUID hashing!
// https://git.io/xJpV