2007-03-22 10:11:15 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Text;
|
|
|
|
using libsecondlife;
|
|
|
|
using OpenSim.Framework.Inventory;
|
2007-05-12 11:58:23 +00:00
|
|
|
using System.Security.Cryptography;
|
2007-03-22 10:11:15 +00:00
|
|
|
|
|
|
|
namespace OpenSim.Framework.User
|
|
|
|
{
|
|
|
|
public class UserProfile
|
|
|
|
{
|
|
|
|
|
|
|
|
public string firstname;
|
|
|
|
public string lastname;
|
|
|
|
public ulong homeregionhandle;
|
|
|
|
public LLVector3 homepos;
|
|
|
|
public LLVector3 homelookat;
|
|
|
|
|
|
|
|
public bool IsGridGod = false;
|
|
|
|
public bool IsLocal = true; // will be used in future for visitors from foreign grids
|
|
|
|
public string AssetURL;
|
|
|
|
public string MD5passwd;
|
|
|
|
|
|
|
|
public LLUUID CurrentSessionID;
|
|
|
|
public LLUUID CurrentSecureSessionID;
|
|
|
|
public LLUUID UUID;
|
|
|
|
public Dictionary<LLUUID, uint> Circuits = new Dictionary<LLUUID, uint>(); // tracks circuit codes
|
|
|
|
|
|
|
|
public AgentInventory Inventory;
|
|
|
|
|
|
|
|
public UserProfile()
|
|
|
|
{
|
|
|
|
Circuits = new Dictionary<LLUUID, uint>();
|
|
|
|
Inventory = new AgentInventory();
|
2007-04-14 12:48:38 +00:00
|
|
|
homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256));
|
2007-04-25 13:03:48 +00:00
|
|
|
homepos = new LLVector3();
|
2007-04-14 12:48:38 +00:00
|
|
|
homelookat = new LLVector3();
|
2007-03-22 10:11:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void InitSessionData()
|
|
|
|
{
|
2007-05-15 18:39:20 +00:00
|
|
|
RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
|
2007-05-12 11:58:23 +00:00
|
|
|
|
2007-05-15 18:39:20 +00:00
|
|
|
byte[] randDataS = new byte[16];
|
|
|
|
byte[] randDataSS = new byte[16];
|
2007-05-12 11:58:23 +00:00
|
|
|
|
2007-05-15 18:39:20 +00:00
|
|
|
rand.GetBytes(randDataS);
|
|
|
|
rand.GetBytes(randDataSS);
|
2007-05-12 11:58:23 +00:00
|
|
|
|
2007-05-15 18:39:20 +00:00
|
|
|
CurrentSecureSessionID = new LLUUID(randDataSS,0);
|
|
|
|
CurrentSessionID = new LLUUID(randDataS,0);
|
2007-05-20 15:50:36 +00:00
|
|
|
|
2007-03-22 10:11:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void AddSimCircuit(uint circuitCode, LLUUID regionUUID)
|
|
|
|
{
|
|
|
|
if (this.Circuits.ContainsKey(regionUUID) == false)
|
|
|
|
this.Circuits.Add(regionUUID, circuitCode);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|