diff --git a/Core/HttpService/HttpAsService.cs b/Core/HttpService/HttpAsService.cs index afcd9d5..b9b525e 100644 --- a/Core/HttpService/HttpAsService.cs +++ b/Core/HttpService/HttpAsService.cs @@ -448,10 +448,11 @@ namespace BetterSecondBot.HttpService { string[] bits = avatar.Split(' '); avataruuid = UUID.Zero; - if (bits.Length == 2) + string findavatar = avatar; + if ((bits.Length == 2) || (avatar.Length != UUID.Zero.ToString().Length)) { - avatar = bot.FindAvatarName2Key(avatar); - if(avatar == "lookup") + findavatar = bot.FindAvatarName2Key(avatar); + if(findavatar == "lookup") { int loops = 0; int secstowait = 7; @@ -459,8 +460,8 @@ namespace BetterSecondBot.HttpService while(loops < (secstowait * delaysize)) { Thread.Sleep(1000/ delaysize); - avatar = bot.FindAvatarName2Key(avatar); - if(avatar != "lookup") + findavatar = bot.FindAvatarName2Key(avatar); + if(findavatar != "lookup") { loops = 55; } @@ -470,7 +471,8 @@ namespace BetterSecondBot.HttpService } } - UUID.TryParse(avatar, out avataruuid); + UUID.TryParse(findavatar, out avataruuid); + } protected void SuccessNoReturn(string command) diff --git a/Core/bottypes/AVstorageBot.cs b/Core/bottypes/AVstorageBot.cs index b327e43..870df10 100644 --- a/Core/bottypes/AVstorageBot.cs +++ b/Core/bottypes/AVstorageBot.cs @@ -323,7 +323,7 @@ namespace BetterSecondBot.bottypes { bits.Add("Resident"); } - avatar_name = bits[0].FirstCharToUpper() + " " + bits[1].FirstCharToUpper(); + avatar_name = bits[0] + " " + bits[1]; string uuid = FindAvatarUUIDInStorage(avatar_name); if (uuid != "") {