Update BasicBot.cs

This commit is contained in:
Madpeterz 2020-12-28 23:56:33 +00:00
parent c0da37f278
commit 95917e93a5

View file

@ -229,9 +229,12 @@ namespace BetterSecondBotShared.bottypes
{ {
Lp = new LoginParams(Client, bits[0], bits[1], myconfig.Basic_BotPassword, "BetterSecondBot", version); Lp = new LoginParams(Client, bits[0], bits[1], myconfig.Basic_BotPassword, "BetterSecondBot", version);
} }
if (use_home_region_redirect == false) if (helpers.notempty(myconfig.Basic_LoginLocation) == false)
{ {
if (helpers.notempty(myconfig.Basic_LoginLocation) == true) myconfig.Basic_LoginLocation = "home";
Info("Basic_LoginLocation: is empty using home!");
}
if (use_home_region_redirect == false)
{ {
if ((myconfig.Basic_LoginLocation != "home") && (myconfig.Basic_LoginLocation != "last")) if ((myconfig.Basic_LoginLocation != "home") && (myconfig.Basic_LoginLocation != "last"))
{ {
@ -242,23 +245,20 @@ namespace BetterSecondBotShared.bottypes
} }
else else
{ {
Info("Basic_LoginLocation: is empty using home!"); if ((myconfig.Basic_LoginLocation != "home") && (myconfig.Basic_LoginLocation != "last"))
{
Lp.Start = "home"; Lp.Start = "home";
} }
} if (Lp.Start == "home")
else
{ {
string[] nexthome = getNextHomeArgs(); Info("Recovery login: using last location not home!");
if (nexthome.Length == 4) {
Info("Recovery login going to "+ nexthome[0]);
AvoidSim(nexthome[0]);
Lp.Start = "" + Lp.URI + ":" + String.Join("&", nexthome);
}
else
{
Info("Recovery login all home locations used: using last");
Lp.Start = "last"; Lp.Start = "last";
} }
else
{
Info("Recovery login: using home location not last!");
Lp.Start = "home";
}
} }
if (reconnect == false) if (reconnect == false)
{ {