aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs64
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs10
3 files changed, 57 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index bbdf92a..b4f6b5a 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -335,54 +335,70 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
335 { 335 {
336 UserData oldUser; 336 UserData oldUser;
337 //lock the whole block - prevent concurrent update 337 //lock the whole block - prevent concurrent update
338 lock (m_UserCache) { 338 lock (m_UserCache)
339 {
339 m_UserCache.TryGetValue (id, out oldUser); 340 m_UserCache.TryGetValue (id, out oldUser);
340 if (oldUser != null) { 341 if (oldUser != null)
341 if (creatorData == null || creatorData == String.Empty) { 342 {
343 if (creatorData == null || creatorData == String.Empty)
344 {
342 //ignore updates without creator data 345 //ignore updates without creator data
343 return; 346 return;
344 } 347 }
345 //try update unknown users 348 //try update unknown users
346 //and creator's home URL's 349 //and creator's home URL's
347 if ((oldUser.FirstName == "Unknown" && !creatorData.Contains ("Unknown")) || (oldUser.HomeURL != null && !creatorData.StartsWith (oldUser.HomeURL))) { 350 if ((oldUser.FirstName == "Unknown" && !creatorData.Contains ("Unknown")) || (oldUser.HomeURL != null && !creatorData.StartsWith (oldUser.HomeURL)))
351 {
348 m_UserCache.Remove (id); 352 m_UserCache.Remove (id);
349// m_log.DebugFormat("[USER MANAGEMENT MODULE]: Re-adding user with id {0}, creatorData [{1}] and old HomeURL {2}", id, creatorData,oldUser.HomeURL); 353// m_log.DebugFormat("[USER MANAGEMENT MODULE]: Re-adding user with id {0}, creatorData [{1}] and old HomeURL {2}", id, creatorData,oldUser.HomeURL);
350 } else { 354 }
355 else
356 {
351 //we have already a valid user within the cache 357 //we have already a valid user within the cache
352 return; 358 return;
353 } 359 }
354 } 360 }
355// m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, creatorData {1}", id, creatorData); 361// m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, creatorData {1}", id, creatorData);
356 362
357 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount (m_Scenes[0].RegionInfo.ScopeID, id); 363 UserAccount account = m_Scenes [0].UserAccountService.GetUserAccount (m_Scenes [0].RegionInfo.ScopeID, id);
358 364
359 if (account != null) { 365 if (account != null)
366 {
360 AddUser (id, account.FirstName, account.LastName); 367 AddUser (id, account.FirstName, account.LastName);
361 } else { 368 }
369 else
370 {
362 UserData user = new UserData (); 371 UserData user = new UserData ();
363 user.Id = id; 372 user.Id = id;
364 373
365 if (creatorData != null && creatorData != string.Empty) { 374 if (creatorData != null && creatorData != string.Empty)
375 {
366 //creatorData = <endpoint>;<name> 376 //creatorData = <endpoint>;<name>
367 377
368 string[] parts = creatorData.Split (';'); 378 string[] parts = creatorData.Split (';');
369 if (parts.Length >= 1) { 379 if (parts.Length >= 1)
370 user.HomeURL = parts[0]; 380 {
371 try { 381 user.HomeURL = parts [0];
372 Uri uri = new Uri (parts[0]); 382 try
383 {
384 Uri uri = new Uri (parts [0]);
373 user.LastName = "@" + uri.Authority; 385 user.LastName = "@" + uri.Authority;
374 } catch (UriFormatException) { 386 }
375 m_log.DebugFormat ("[SCENE]: Unable to parse Uri {0}", parts[0]); 387 catch (UriFormatException)
388 {
389 m_log.DebugFormat ("[SCENE]: Unable to parse Uri {0}", parts [0]);
376 user.LastName = "@unknown"; 390 user.LastName = "@unknown";
377 } 391 }
378 } 392 }
379 if (parts.Length >= 2) 393 if (parts.Length >= 2)
380 user.FirstName = parts[1].Replace (' ', '.'); 394 user.FirstName = parts [1].Replace (' ', '.');
381 } else { 395 }
396 else
397 {
382 user.FirstName = "Unknown"; 398 user.FirstName = "Unknown";
383 user.LastName = "User"; 399 user.LastName = "User";
384 } 400 }
385 401
386 AddUserInternal (user); 402 AddUserInternal (user);
387 } 403 }
388 } 404 }
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index f5683f0..f4cf6b4 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -132,6 +132,12 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
132 132
133 public void RegionLoaded(Scene scene) 133 public void RegionLoaded(Scene scene)
134 { 134 {
135 IScriptModule[] scriptModules = scene.RequestModuleInterfaces<IScriptModule>();
136 foreach (IScriptModule scriptModule in scriptModules)
137 {
138 scriptModule.OnScriptRemoved += ScriptRemoved;
139 scriptModule.OnObjectRemoved += ObjectRemoved;
140 }
135 } 141 }
136 142
137 public void RemoveRegion(Scene scene) 143 public void RemoveRegion(Scene scene)
@@ -289,6 +295,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
289 295
290 public void ScriptRemoved(UUID itemID) 296 public void ScriptRemoved(UUID itemID)
291 { 297 {
298// m_log.DebugFormat("[URL MODULE]: Removing script {0}", itemID);
299
292 lock (m_UrlMap) 300 lock (m_UrlMap)
293 { 301 {
294 List<string> removeURLs = new List<string>(); 302 List<string> removeURLs = new List<string>();
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
index 0707cbe..a945fc2 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
@@ -98,6 +98,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
98 98
99 OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; }); 99 OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; });
100 options.Add("s|skip-assets", delegate (string v) { skipAssets = v != null; }); 100 options.Add("s|skip-assets", delegate (string v) { skipAssets = v != null; });
101
102 // Send a message to the region ready module
103 IRegionReadyModule rready = m_scene.RequestModuleInterface<IRegionReadyModule>();
104
105 if (rready != null)
106 {
107 rready.OarLoadingAlert("load");
108 }
101 109
102 List<string> mainParams = options.Parse(cmdparams); 110 List<string> mainParams = options.Parse(cmdparams);
103 111
@@ -125,7 +133,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
125 Dictionary<string, object> options = new Dictionary<string, object>(); 133 Dictionary<string, object> options = new Dictionary<string, object>();
126 134
127 OptionSet ops = new OptionSet(); 135 OptionSet ops = new OptionSet();
128 136
129 // legacy argument [obsolete] 137 // legacy argument [obsolete]
130 ops.Add("p|profile=", delegate(string v) { Console.WriteLine("\n WARNING: -profile option is obsolete and it will not work. Use -home instead.\n"); }); 138 ops.Add("p|profile=", delegate(string v) { Console.WriteLine("\n WARNING: -profile option is obsolete and it will not work. Use -home instead.\n"); });
131 // preferred 139 // preferred