diff options
Merge commit '522d6261f11ffaf8320c3f0775beb5d0608ce226' into bigmerge
Conflicts:
OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index dd0ea67..85870f0 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -41,11 +41,14 @@ using OpenSim.Framework.Servers; | |||
41 | using OpenSim.Framework.Servers.HttpServer; | 41 | using OpenSim.Framework.Servers.HttpServer; |
42 | using OpenSim.Framework.Statistics; | 42 | using OpenSim.Framework.Statistics; |
43 | using OpenSim.Region.ClientStack; | 43 | using OpenSim.Region.ClientStack; |
44 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; | ||
44 | using OpenSim.Region.Framework; | 45 | using OpenSim.Region.Framework; |
45 | using OpenSim.Region.Framework.Interfaces; | 46 | using OpenSim.Region.Framework.Interfaces; |
46 | using OpenSim.Region.Framework.Scenes; | 47 | using OpenSim.Region.Framework.Scenes; |
47 | using OpenSim.Region.Physics.Manager; | 48 | using OpenSim.Region.Physics.Manager; |
48 | using OpenSim.Server.Base; | 49 | using OpenSim.Server.Base; |
50 | using OpenSim.Services.Interfaces; | ||
51 | using OpenSim.Services.UserAccountService; | ||
49 | 52 | ||
50 | namespace OpenSim | 53 | namespace OpenSim |
51 | { | 54 | { |
@@ -411,6 +414,53 @@ namespace OpenSim | |||
411 | scene.SnmpService.BootInfo("Loading prins", scene); | 414 | scene.SnmpService.BootInfo("Loading prins", scene); |
412 | } | 415 | } |
413 | 416 | ||
417 | // FIXME: Put me into a separate method! | ||
418 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) | ||
419 | { | ||
420 | MainConsole.Instance.OutputFormat("Estate {0} has no owner set.", regionInfo.EstateSettings.EstateName); | ||
421 | List<char> excluded = new List<char>(new char[1]{' '}); | ||
422 | string first = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded); | ||
423 | string last = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded); | ||
424 | |||
425 | UserAccount account = scene.UserAccountService.GetUserAccount(regionInfo.ScopeID, first, last); | ||
426 | |||
427 | if (account == null) | ||
428 | { | ||
429 | m_log.DebugFormat("A {0}", scene.UserAccountService.GetType()); | ||
430 | |||
431 | // if (scene.UserAccountService is LocalUserAccountServicesConnector) | ||
432 | // { | ||
433 | // IUserAccountService innerUas | ||
434 | // = ((LocalUserAccountServicesConnector)scene.UserAccountService).UserAccountService; | ||
435 | // | ||
436 | // m_log.DebugFormat("B {0}", innerUas.GetType()); | ||
437 | // | ||
438 | // if (innerUas is UserAccountService) | ||
439 | // { | ||
440 | |||
441 | if (scene.UserAccountService is UserAccountService) | ||
442 | { | ||
443 | string password = MainConsole.Instance.PasswdPrompt("Password"); | ||
444 | string email = MainConsole.Instance.CmdPrompt("Email", ""); | ||
445 | |||
446 | // TODO: Where do we put m_regInfo.ScopeID? | ||
447 | account = ((UserAccountService)scene.UserAccountService).CreateUser(first, last, password, email); | ||
448 | } | ||
449 | // } | ||
450 | } | ||
451 | |||
452 | if (account == null) | ||
453 | { | ||
454 | m_log.ErrorFormat( | ||
455 | "[OPENSIM]: Unable to store account. If this simulator is connected to a grid, you must create the estate owner account first."); | ||
456 | } | ||
457 | else | ||
458 | { | ||
459 | regionInfo.EstateSettings.EstateOwner = account.PrincipalID; | ||
460 | regionInfo.EstateSettings.Save(); | ||
461 | } | ||
462 | } | ||
463 | |||
414 | // Prims have to be loaded after module configuration since some modules may be invoked during the load | 464 | // Prims have to be loaded after module configuration since some modules may be invoked during the load |
415 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); | 465 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); |
416 | 466 | ||