adds access list support for RequestTeleport
This commit is contained in:
parent
9a4cdda149
commit
06ac2cd1d2
1 changed files with 19 additions and 0 deletions
|
|
@ -164,9 +164,28 @@ namespace BetterSecondBotShared.bottypes
|
|||
}
|
||||
}
|
||||
|
||||
protected List<UUID> accept_next_teleport_from = new List<UUID>();
|
||||
public void add_uuid_to_teleport_list(UUID avatar)
|
||||
{
|
||||
if (accept_next_teleport_from.Contains(avatar) == false)
|
||||
{
|
||||
accept_next_teleport_from.Add(avatar);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void RequestTeleport(UUID IMSessionID, string FromAgentName, UUID FromAgentID)
|
||||
{
|
||||
bool allow = false;
|
||||
if (FromAgentName == myconfig.master)
|
||||
{
|
||||
allow = true;
|
||||
}
|
||||
else if(accept_next_teleport_from.Contains(FromAgentID) == true)
|
||||
{
|
||||
allow = true;
|
||||
accept_next_teleport_from.Remove(FromAgentID);
|
||||
}
|
||||
if(allow == true)
|
||||
{
|
||||
ResetAnimations();
|
||||
SetTeleported();
|
||||
|
|
|
|||
Loading…
Reference in a new issue