aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorMelanie2011-10-11 21:28:23 +0100
committerMelanie2011-10-11 21:28:23 +0100
commit8fac7c065088d9861ba2ff772fde7f2e9c8d1003 (patch)
tree715c078c3a0ad1298b6b560cf31c2d445c22700a /OpenSim/Region/Application
parentMerge commit 'c4efb97d49dec736151dfa3fa102efe6a5f6fbab' into bigmerge (diff)
parentCorrectly create a freshly created estate owner's default items and avatar en... (diff)
downloadopensim-SC-8fac7c065088d9861ba2ff772fde7f2e9c8d1003.zip
opensim-SC-8fac7c065088d9861ba2ff772fde7f2e9c8d1003.tar.gz
opensim-SC-8fac7c065088d9861ba2ff772fde7f2e9c8d1003.tar.bz2
opensim-SC-8fac7c065088d9861ba2ff772fde7f2e9c8d1003.tar.xz
Merge commit '522d6261f11ffaf8320c3f0775beb5d0608ce226' into bigmerge
Conflicts: OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs50
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;
41using OpenSim.Framework.Servers.HttpServer; 41using OpenSim.Framework.Servers.HttpServer;
42using OpenSim.Framework.Statistics; 42using OpenSim.Framework.Statistics;
43using OpenSim.Region.ClientStack; 43using OpenSim.Region.ClientStack;
44using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
44using OpenSim.Region.Framework; 45using OpenSim.Region.Framework;
45using OpenSim.Region.Framework.Interfaces; 46using OpenSim.Region.Framework.Interfaces;
46using OpenSim.Region.Framework.Scenes; 47using OpenSim.Region.Framework.Scenes;
47using OpenSim.Region.Physics.Manager; 48using OpenSim.Region.Physics.Manager;
48using OpenSim.Server.Base; 49using OpenSim.Server.Base;
50using OpenSim.Services.Interfaces;
51using OpenSim.Services.UserAccountService;
49 52
50namespace OpenSim 53namespace 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