Removes OnStartLinkupWithMaster flag (its not needed anymore)

This commit is contained in:
Madpeter 2020-05-10 22:37:22 +01:00
parent 46b8ffceba
commit a32b74e2cc
3 changed files with 7 additions and 14 deletions

View file

@ -17,7 +17,6 @@ namespace BetterSecondBotShared.Json
// Settings
public bool allowRLV { get; set; }
public bool OnStartLinkupWithMaster { get; set; }
// Mixed
public bool CommandsToConsole { get; set; }

View file

@ -40,7 +40,6 @@ namespace BetterSecondBotShared.Json
case "athomelocktopos": { return "AtHome"; }
case "athomelocktoposmaxrange": { return "AtHome"; }
case "allowfunds": { return "security"; }
case "onstartlinkupwithmaster": { return "Options"; }
default: { return "Unknown"; }
}
}
@ -73,7 +72,6 @@ namespace BetterSecondBotShared.Json
case "athomelocktopos": { return "When set to true the @home system will attempt to teleport the bot back to the home pos if it leaves athomelocktopos maxrange"; }
case "athomelocktoposmaxrange": { return "How far away from the location in homeregion can the bot be before teleporting"; }
case "allowfunds": { return "Allow the bot to transfer L$ to avatars / objects and display its L$ balance via command/web gui"; }
case "onstartlinkupwithmaster": { return "After the bot logs in should it send the master a friend request, IM them and request teleport"; }
default: { return "None given"; }
}
}
@ -126,7 +124,6 @@ namespace BetterSecondBotShared.Json
case "athomelocktopos": { return new[] { "false" }; }
case "athomelocktoposmaxrange": { return new[] { "10.0" }; }
case "allowfunds": { return new[] { "true" }; }
case "onstartlinkupwithmaster": { return new[] { "true" }; }
default: { return new string[] { }; }
}
}

View file

@ -26,17 +26,14 @@ namespace BSB.bottypes
if ((masteruuid_ready == true) && (friendslist_ready == true) && (started_friendship_hug == false))
{
started_friendship_hug = true;
if (myconfig.OnStartLinkupWithMaster == true)
if (Client.Friends.FriendList.ContainsKey(master_uuid) == false)
{
if (Client.Friends.FriendList.ContainsKey(master_uuid) == false)
{
CommandsInterface.Call("IM", String.Join("~#~", new string[] { myconfig.master, "Hello master, I am sending you a friend request now!" }));
CommandsInterface.Call("FriendRequest", myconfig.master, Client.Self.AgentID);
}
else
{
CommandsInterface.Call("FriendFullPerms", String.Join("~#~", new string[] { myconfig.master, "true" }), Client.Self.AgentID);
}
CommandsInterface.Call("IM", String.Join("~#~", new string[] { myconfig.master, "Hello master, I am sending you a friend request now!" }));
CommandsInterface.Call("FriendRequest", myconfig.master, Client.Self.AgentID);
}
else
{
CommandsInterface.Call("FriendFullPerms", String.Join("~#~", new string[] { myconfig.master, "true" }), Client.Self.AgentID);
}
}
}