diff options
author | MW | 2007-05-26 13:40:19 +0000 |
---|---|---|
committer | MW | 2007-05-26 13:40:19 +0000 |
commit | 3436961bb5c01d659d09be134368f4f69460cef9 (patch) | |
tree | 3753ba4d7818df2a6bce0bbe863ff033cdfd568a /Common/OpenSim.Framework/UserProfile.cs | |
download | opensim-SC_OLD-3436961bb5c01d659d09be134368f4f69460cef9.zip opensim-SC_OLD-3436961bb5c01d659d09be134368f4f69460cef9.tar.gz opensim-SC_OLD-3436961bb5c01d659d09be134368f4f69460cef9.tar.bz2 opensim-SC_OLD-3436961bb5c01d659d09be134368f4f69460cef9.tar.xz |
Start of rewrite 5279!
Diffstat (limited to 'Common/OpenSim.Framework/UserProfile.cs')
-rw-r--r-- | Common/OpenSim.Framework/UserProfile.cs | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Common/OpenSim.Framework/UserProfile.cs b/Common/OpenSim.Framework/UserProfile.cs new file mode 100644 index 0000000..f95a8fa --- /dev/null +++ b/Common/OpenSim.Framework/UserProfile.cs | |||
@@ -0,0 +1,62 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | using OpenSim.Framework.Inventory; | ||
6 | using System.Security.Cryptography; | ||
7 | |||
8 | namespace OpenSim.Framework.User | ||
9 | { | ||
10 | public class UserProfile | ||
11 | { | ||
12 | |||
13 | public string firstname; | ||
14 | public string lastname; | ||
15 | public ulong homeregionhandle; | ||
16 | public LLVector3 homepos; | ||
17 | public LLVector3 homelookat; | ||
18 | |||
19 | public bool IsGridGod = false; | ||
20 | public bool IsLocal = true; // will be used in future for visitors from foreign grids | ||
21 | public string AssetURL; | ||
22 | public string MD5passwd; | ||
23 | |||
24 | public LLUUID CurrentSessionID; | ||
25 | public LLUUID CurrentSecureSessionID; | ||
26 | public LLUUID UUID; | ||
27 | public Dictionary<LLUUID, uint> Circuits = new Dictionary<LLUUID, uint>(); // tracks circuit codes | ||
28 | |||
29 | public AgentInventory Inventory; | ||
30 | |||
31 | public UserProfile() | ||
32 | { | ||
33 | Circuits = new Dictionary<LLUUID, uint>(); | ||
34 | Inventory = new AgentInventory(); | ||
35 | homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256)); | ||
36 | homepos = new LLVector3(); | ||
37 | homelookat = new LLVector3(); | ||
38 | } | ||
39 | |||
40 | public void InitSessionData() | ||
41 | { | ||
42 | RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); | ||
43 | |||
44 | byte[] randDataS = new byte[16]; | ||
45 | byte[] randDataSS = new byte[16]; | ||
46 | |||
47 | rand.GetBytes(randDataS); | ||
48 | rand.GetBytes(randDataSS); | ||
49 | |||
50 | CurrentSecureSessionID = new LLUUID(randDataSS,0); | ||
51 | CurrentSessionID = new LLUUID(randDataS,0); | ||
52 | |||
53 | } | ||
54 | |||
55 | public void AddSimCircuit(uint circuitCode, LLUUID regionUUID) | ||
56 | { | ||
57 | if (this.Circuits.ContainsKey(regionUUID) == false) | ||
58 | this.Circuits.Add(regionUUID, circuitCode); | ||
59 | } | ||
60 | |||
61 | } | ||
62 | } | ||