diff options
author | Teravus Ovares | 2008-01-05 06:05:25 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-01-05 06:05:25 +0000 |
commit | db3edff5d5f1c9a31f377db77d1ac4e1fa685623 (patch) | |
tree | 5b2066a5556b3eff8f0152bdb3ce109b428081fe /OpenSim/Framework/Communications/UserManagerBase.cs | |
parent | * Added shell Messaging Server. Don't run the MessagingServer yet or you mig... (diff) | |
download | opensim-SC_OLD-db3edff5d5f1c9a31f377db77d1ac4e1fa685623.zip opensim-SC_OLD-db3edff5d5f1c9a31f377db77d1ac4e1fa685623.tar.gz opensim-SC_OLD-db3edff5d5f1c9a31f377db77d1ac4e1fa685623.tar.bz2 opensim-SC_OLD-db3edff5d5f1c9a31f377db77d1ac4e1fa685623.tar.xz |
* Applying jhurliman's LLSD login enablement patch.
* I'm keeping it deactivated until some issues are resolved.
* I'm patching it in deactivated so the patch doesn't get outdated
* I've deactivated it by commenting out the handler for the application/xml+llsd content type.
* While I've tested this as much as possible on my setup and found the deactivated code doesn't cause any problems, consider this update experimental (event though it's deactivated)
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 5d62e5e..bea56ea 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -31,6 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Security.Cryptography; | 32 | using System.Security.Cryptography; |
33 | using libsecondlife; | 33 | using libsecondlife; |
34 | using libsecondlife.StructuredData; | ||
34 | using Nwc.XmlRpc; | 35 | using Nwc.XmlRpc; |
35 | using OpenSim.Framework.Console; | 36 | using OpenSim.Framework.Console; |
36 | 37 | ||
@@ -394,6 +395,41 @@ namespace OpenSim.Framework.UserManagement | |||
394 | profile.currentAgent = agent; | 395 | profile.currentAgent = agent; |
395 | } | 396 | } |
396 | 397 | ||
398 | public void CreateAgent(UserProfileData profile, LLSD request) | ||
399 | { | ||
400 | UserAgentData agent = new UserAgentData(); | ||
401 | |||
402 | // User connection | ||
403 | agent.agentOnline = true; | ||
404 | |||
405 | // Generate sessions | ||
406 | RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); | ||
407 | byte[] randDataS = new byte[16]; | ||
408 | byte[] randDataSS = new byte[16]; | ||
409 | rand.GetBytes(randDataS); | ||
410 | rand.GetBytes(randDataSS); | ||
411 | |||
412 | agent.secureSessionID = new LLUUID(randDataSS, 0); | ||
413 | agent.sessionID = new LLUUID(randDataS, 0); | ||
414 | |||
415 | // Profile UUID | ||
416 | agent.UUID = profile.UUID; | ||
417 | |||
418 | // Current position (from Home) | ||
419 | agent.currentHandle = profile.homeRegion; | ||
420 | agent.currentPos = profile.homeLocation; | ||
421 | |||
422 | // What time did the user login? | ||
423 | agent.loginTime = Util.UnixTimeSinceEpoch(); | ||
424 | agent.logoutTime = 0; | ||
425 | |||
426 | // Current location | ||
427 | agent.regionID = LLUUID.Zero; // Fill in later | ||
428 | agent.currentRegion = LLUUID.Zero; // Fill in later | ||
429 | |||
430 | profile.currentAgent = agent; | ||
431 | } | ||
432 | |||
397 | /// <summary> | 433 | /// <summary> |
398 | /// Saves a target agent to the database | 434 | /// Saves a target agent to the database |
399 | /// </summary> | 435 | /// </summary> |
@@ -445,4 +481,4 @@ namespace OpenSim.Framework.UserManagement | |||
445 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password); | 481 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password); |
446 | public abstract UserProfileData SetupMasterUser(LLUUID uuid); | 482 | public abstract UserProfileData SetupMasterUser(LLUUID uuid); |
447 | } | 483 | } |
448 | } \ No newline at end of file | 484 | } |