aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2011-10-11 21:28:23 +0100
committerMelanie2011-10-11 21:28:23 +0100
commit8fac7c065088d9861ba2ff772fde7f2e9c8d1003 (patch)
tree715c078c3a0ad1298b6b560cf31c2d445c22700a /OpenSim/Region/Framework/Scenes
parentMerge commit 'c4efb97d49dec736151dfa3fa102efe6a5f6fbab' into bigmerge (diff)
parentCorrectly create a freshly created estate owner's default items and avatar en... (diff)
downloadopensim-SC_OLD-8fac7c065088d9861ba2ff772fde7f2e9c8d1003.zip
opensim-SC_OLD-8fac7c065088d9861ba2ff772fde7f2e9c8d1003.tar.gz
opensim-SC_OLD-8fac7c065088d9861ba2ff772fde7f2e9c8d1003.tar.bz2
opensim-SC_OLD-8fac7c065088d9861ba2ff772fde7f2e9c8d1003.tar.xz
Merge commit '522d6261f11ffaf8320c3f0775beb5d0608ce226' into bigmerge
Conflicts: OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs82
1 files changed, 0 insertions, 82 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 74ae47a..7897564 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1198,88 +1198,6 @@ namespace OpenSim.Region.Framework.Scenes
1198 m_dialogModule = RequestModuleInterface<IDialogModule>(); 1198 m_dialogModule = RequestModuleInterface<IDialogModule>();
1199 m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); 1199 m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
1200 m_teleportModule = RequestModuleInterface<IEntityTransferModule>(); 1200 m_teleportModule = RequestModuleInterface<IEntityTransferModule>();
1201
1202 // Shoving this in here for now, because we have the needed
1203 // interfaces at this point
1204 //
1205 // TODO: Find a better place for this
1206 //
1207 while (m_regInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null)
1208 {
1209 MainConsole.Instance.OutputFormat("Estate {0} has no owner set.", m_regInfo.EstateSettings.EstateName);
1210 List<char> excluded = new List<char>(new char[1]{' '});
1211 string first = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded);
1212 string last = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded);
1213
1214 UserAccount account = UserAccountService.GetUserAccount(m_regInfo.ScopeID, first, last);
1215
1216 if (account == null)
1217 {
1218 // Create a new account
1219 account = new UserAccount(m_regInfo.ScopeID, first, last, String.Empty);
1220 if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0))
1221 {
1222 account.ServiceURLs = new Dictionary<string, object>();
1223 account.ServiceURLs["HomeURI"] = string.Empty;
1224 account.ServiceURLs["GatekeeperURI"] = string.Empty;
1225 account.ServiceURLs["InventoryServerURI"] = string.Empty;
1226 account.ServiceURLs["AssetServerURI"] = string.Empty;
1227 }
1228
1229 if (UserAccountService.StoreUserAccount(account))
1230 {
1231 string password = MainConsole.Instance.PasswdPrompt("Password");
1232 string email = MainConsole.Instance.CmdPrompt("Email", "");
1233
1234 account.Email = email;
1235 UserAccountService.StoreUserAccount(account);
1236
1237 bool success = false;
1238 success = AuthenticationService.SetPassword(account.PrincipalID, password);
1239 if (!success)
1240 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set password for account {0} {1}.",
1241 first, last);
1242
1243 GridRegion home = null;
1244 if (GridService != null)
1245 {
1246 List<GridRegion> defaultRegions = GridService.GetDefaultRegions(UUID.Zero);
1247 if (defaultRegions != null && defaultRegions.Count >= 1)
1248 home = defaultRegions[0];
1249
1250 if (GridUserService != null && home != null)
1251 GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
1252 else
1253 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set home for account {0} {1}.",
1254 first, last);
1255
1256 }
1257 else
1258 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to retrieve home region for account {0} {1}.",
1259 first, last);
1260
1261 if (InventoryService != null)
1262 success = InventoryService.CreateUserInventory(account.PrincipalID);
1263 if (!success)
1264 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.",
1265 first, last);
1266
1267
1268
1269 m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", first, last);
1270
1271 m_regInfo.EstateSettings.EstateOwner = account.PrincipalID;
1272 m_regInfo.EstateSettings.Save();
1273 }
1274 else
1275 m_log.ErrorFormat("[SCENE]: Unable to store account. If this simulator is connected to a grid, you must create the estate owner account first.");
1276 }
1277 else
1278 {
1279 m_regInfo.EstateSettings.EstateOwner = account.PrincipalID;
1280 m_regInfo.EstateSettings.Save();
1281 }
1282 }
1283 } 1201 }
1284 1202
1285 #endregion 1203 #endregion