diff options
author | Melanie | 2013-05-24 00:45:08 +0100 |
---|---|---|
committer | Melanie | 2013-05-24 00:45:08 +0100 |
commit | 09c2cd0d76e62cbc7bb2d8b0f21caae901af1681 (patch) | |
tree | 1856552dd68bfa23877f28842cb00e9e0089d1c4 /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | BulletSim: specify directory for OpenSim.Region.Physics.Meshing (diff) | |
download | opensim-SC-09c2cd0d76e62cbc7bb2d8b0f21caae901af1681.zip opensim-SC-09c2cd0d76e62cbc7bb2d8b0f21caae901af1681.tar.gz opensim-SC-09c2cd0d76e62cbc7bb2d8b0f21caae901af1681.tar.bz2 opensim-SC-09c2cd0d76e62cbc7bb2d8b0f21caae901af1681.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/CoreModules')
4 files changed, 101 insertions, 37 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 8056030..4613344 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -371,7 +371,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
371 | foreach (string fid in outstanding) | 371 | foreach (string fid in outstanding) |
372 | { | 372 | { |
373 | UUID fromAgentID; | 373 | UUID fromAgentID; |
374 | string firstname = "Unknown", lastname = "User"; | 374 | string firstname = "Unknown", lastname = "UserFMSFOIN"; |
375 | if (!GetAgentInfo(client.Scene.RegionInfo.ScopeID, fid, out fromAgentID, out firstname, out lastname)) | 375 | if (!GetAgentInfo(client.Scene.RegionInfo.ScopeID, fid, out fromAgentID, out firstname, out lastname)) |
376 | { | 376 | { |
377 | m_log.DebugFormat("[FRIENDS MODULE]: skipping malformed friend {0}", fid); | 377 | m_log.DebugFormat("[FRIENDS MODULE]: skipping malformed friend {0}", fid); |
@@ -397,7 +397,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
397 | 397 | ||
398 | protected virtual bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) | 398 | protected virtual bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) |
399 | { | 399 | { |
400 | first = "Unknown"; last = "User"; | 400 | first = "Unknown"; last = "UserFMGAI"; |
401 | if (!UUID.TryParse(fid, out agentID)) | 401 | if (!UUID.TryParse(fid, out agentID)) |
402 | return false; | 402 | return false; |
403 | 403 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index bf5c0bb..b3e3aa2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | |||
@@ -293,7 +293,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
293 | 293 | ||
294 | protected override bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) | 294 | protected override bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) |
295 | { | 295 | { |
296 | first = "Unknown"; last = "User"; | 296 | first = "Unknown"; last = "UserHGGAI"; |
297 | if (base.GetAgentInfo(scopeID, fid, out agentID, out first, out last)) | 297 | if (base.GetAgentInfo(scopeID, fid, out agentID, out first, out last)) |
298 | return true; | 298 | return true; |
299 | 299 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 6847e57..a720d7b 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -157,13 +157,16 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
157 | } | 157 | } |
158 | else | 158 | else |
159 | { | 159 | { |
160 | string[] names = GetUserNames(uuid); | 160 | string[] names; |
161 | bool foundRealName = TryGetUserNames(uuid, out names); | ||
162 | |||
161 | if (names.Length == 2) | 163 | if (names.Length == 2) |
162 | { | 164 | { |
163 | //m_log.DebugFormat("[XXX] HandleUUIDNameRequest {0} is {1} {2}", uuid, names[0], names[1]); | 165 | if (!foundRealName) |
166 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: Sending {0} {1} for {2} to {3} since no bound name found", names[0], names[1], uuid, remote_client.Name); | ||
167 | |||
164 | remote_client.SendNameReply(uuid, names[0], names[1]); | 168 | remote_client.SendNameReply(uuid, names[0], names[1]); |
165 | } | 169 | } |
166 | |||
167 | } | 170 | } |
168 | } | 171 | } |
169 | 172 | ||
@@ -246,10 +249,15 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
246 | } | 249 | } |
247 | 250 | ||
248 | // search the local cache | 251 | // search the local cache |
249 | foreach (UserData data in m_UserCache.Values) | 252 | lock (m_UserCache) |
250 | if (users.Find(delegate(UserData d) { return d.Id == data.Id; }) == null && | 253 | { |
251 | (data.FirstName.ToLower().StartsWith(query.ToLower()) || data.LastName.ToLower().StartsWith(query.ToLower()))) | 254 | foreach (UserData data in m_UserCache.Values) |
252 | users.Add(data); | 255 | { |
256 | if (users.Find(delegate(UserData d) { return d.Id == data.Id; }) == null && | ||
257 | (data.FirstName.ToLower().StartsWith(query.ToLower()) || data.LastName.ToLower().StartsWith(query.ToLower()))) | ||
258 | users.Add(data); | ||
259 | } | ||
260 | } | ||
253 | 261 | ||
254 | AddAdditionalUsers(query, users); | 262 | AddAdditionalUsers(query, users); |
255 | 263 | ||
@@ -272,17 +280,24 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
272 | } | 280 | } |
273 | } | 281 | } |
274 | 282 | ||
275 | private string[] GetUserNames(UUID uuid) | 283 | /// <summary> |
284 | /// Try to get the names bound to the given uuid. | ||
285 | /// </summary> | ||
286 | /// <returns>True if the name was found, false if not.</returns> | ||
287 | /// <param name='uuid'></param> | ||
288 | /// <param name='names'>The array of names if found. If not found, then names[0] = "Unknown" and names[1] = "User"</param> | ||
289 | private bool TryGetUserNames(UUID uuid, out string[] names) | ||
276 | { | 290 | { |
277 | string[] returnstring = new string[2]; | 291 | names = new string[2]; |
278 | 292 | ||
279 | lock (m_UserCache) | 293 | lock (m_UserCache) |
280 | { | 294 | { |
281 | if (m_UserCache.ContainsKey(uuid)) | 295 | if (m_UserCache.ContainsKey(uuid)) |
282 | { | 296 | { |
283 | returnstring[0] = m_UserCache[uuid].FirstName; | 297 | names[0] = m_UserCache[uuid].FirstName; |
284 | returnstring[1] = m_UserCache[uuid].LastName; | 298 | names[1] = m_UserCache[uuid].LastName; |
285 | return returnstring; | 299 | |
300 | return true; | ||
286 | } | 301 | } |
287 | } | 302 | } |
288 | 303 | ||
@@ -290,8 +305,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
290 | 305 | ||
291 | if (account != null) | 306 | if (account != null) |
292 | { | 307 | { |
293 | returnstring[0] = account.FirstName; | 308 | names[0] = account.FirstName; |
294 | returnstring[1] = account.LastName; | 309 | names[1] = account.LastName; |
295 | 310 | ||
296 | UserData user = new UserData(); | 311 | UserData user = new UserData(); |
297 | user.FirstName = account.FirstName; | 312 | user.FirstName = account.FirstName; |
@@ -299,14 +314,16 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
299 | 314 | ||
300 | lock (m_UserCache) | 315 | lock (m_UserCache) |
301 | m_UserCache[uuid] = user; | 316 | m_UserCache[uuid] = user; |
317 | |||
318 | return true; | ||
302 | } | 319 | } |
303 | else | 320 | else |
304 | { | 321 | { |
305 | returnstring[0] = "Unknown"; | 322 | names[0] = "Unknown"; |
306 | returnstring[1] = "User"; | 323 | names[1] = "UserUMMTGUN"; |
307 | } | ||
308 | 324 | ||
309 | return returnstring; | 325 | return false; |
326 | } | ||
310 | } | 327 | } |
311 | 328 | ||
312 | #region IUserManagement | 329 | #region IUserManagement |
@@ -342,15 +359,17 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
342 | 359 | ||
343 | public string GetUserName(UUID uuid) | 360 | public string GetUserName(UUID uuid) |
344 | { | 361 | { |
345 | string[] names = GetUserNames(uuid); | 362 | string[] names; |
363 | TryGetUserNames(uuid, out names); | ||
364 | |||
346 | if (names.Length == 2) | 365 | if (names.Length == 2) |
347 | { | 366 | { |
348 | string firstname = names[0]; | 367 | string firstname = names[0]; |
349 | string lastname = names[1]; | 368 | string lastname = names[1]; |
350 | 369 | ||
351 | return firstname + " " + lastname; | 370 | return firstname + " " + lastname; |
352 | |||
353 | } | 371 | } |
372 | |||
354 | return "(hippos)"; | 373 | return "(hippos)"; |
355 | } | 374 | } |
356 | 375 | ||
@@ -466,12 +485,13 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
466 | //ignore updates without creator data | 485 | //ignore updates without creator data |
467 | return; | 486 | return; |
468 | } | 487 | } |
488 | |||
469 | //try update unknown users | 489 | //try update unknown users |
470 | //and creator's home URL's | 490 | //and creator's home URL's |
471 | if ((oldUser.FirstName == "Unknown" && !creatorData.Contains ("Unknown")) || (oldUser.HomeURL != null && !creatorData.StartsWith (oldUser.HomeURL))) | 491 | if ((oldUser.FirstName == "Unknown" && !creatorData.Contains ("Unknown")) || (oldUser.HomeURL != null && !creatorData.StartsWith (oldUser.HomeURL))) |
472 | { | 492 | { |
473 | m_UserCache.Remove (id); | 493 | m_UserCache.Remove (id); |
474 | // m_log.DebugFormat("[USER MANAGEMENT MODULE]: Re-adding user with id {0}, creatorData [{1}] and old HomeURL {2}", id, creatorData,oldUser.HomeURL); | 494 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: Re-adding user with id {0}, creatorData [{1}] and old HomeURL {2}", id, creatorData, oldUser.HomeURL); |
475 | } | 495 | } |
476 | else | 496 | else |
477 | { | 497 | { |
@@ -516,7 +536,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
516 | else | 536 | else |
517 | { | 537 | { |
518 | user.FirstName = "Unknown"; | 538 | user.FirstName = "Unknown"; |
519 | user.LastName = "User"; | 539 | user.LastName = "UserUMMAU"; |
520 | } | 540 | } |
521 | 541 | ||
522 | AddUserInternal (user); | 542 | AddUserInternal (user); |
@@ -548,6 +568,13 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
548 | protected void RegisterConsoleCmds() | 568 | protected void RegisterConsoleCmds() |
549 | { | 569 | { |
550 | MainConsole.Instance.Commands.AddCommand("Users", true, | 570 | MainConsole.Instance.Commands.AddCommand("Users", true, |
571 | "show name", | ||
572 | "show name <uuid>", | ||
573 | "Show the bindings between a single user UUID and a user name", | ||
574 | String.Empty, | ||
575 | HandleShowUser); | ||
576 | |||
577 | MainConsole.Instance.Commands.AddCommand("Users", true, | ||
551 | "show names", | 578 | "show names", |
552 | "show names", | 579 | "show names", |
553 | "Show the bindings between user UUIDs and user names", | 580 | "Show the bindings between user UUIDs and user names", |
@@ -555,26 +582,54 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
555 | HandleShowUsers); | 582 | HandleShowUsers); |
556 | } | 583 | } |
557 | 584 | ||
558 | private void HandleShowUsers(string module, string[] cmd) | 585 | private void HandleShowUser(string module, string[] cmd) |
559 | { | 586 | { |
587 | if (cmd.Length < 3) | ||
588 | { | ||
589 | MainConsole.Instance.OutputFormat("Usage: show name <uuid>"); | ||
590 | return; | ||
591 | } | ||
592 | |||
593 | UUID userId; | ||
594 | if (!ConsoleUtil.TryParseConsoleUuid(MainConsole.Instance, cmd[2], out userId)) | ||
595 | return; | ||
596 | |||
597 | string[] names; | ||
598 | |||
599 | UserData ud; | ||
600 | |||
560 | lock (m_UserCache) | 601 | lock (m_UserCache) |
561 | { | 602 | { |
562 | if (m_UserCache.Count == 0) | 603 | if (!m_UserCache.TryGetValue(userId, out ud)) |
563 | { | 604 | { |
564 | MainConsole.Instance.Output("No users found"); | 605 | MainConsole.Instance.OutputFormat("No name known for user with id {0}", userId); |
565 | return; | 606 | return; |
566 | } | 607 | } |
567 | 608 | } | |
568 | MainConsole.Instance.Output("UUID User Name"); | 609 | |
569 | MainConsole.Instance.Output("-----------------------------------------------------------------------------"); | 610 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); |
611 | cdt.AddColumn("UUID", 36); | ||
612 | cdt.AddColumn("Name", 30); | ||
613 | cdt.AddColumn("HomeURL", 40); | ||
614 | cdt.AddRow(userId, string.Format("{0} {1}", ud.FirstName, ud.LastName), ud.HomeURL); | ||
615 | |||
616 | MainConsole.Instance.Output(cdt.ToString()); | ||
617 | } | ||
618 | |||
619 | private void HandleShowUsers(string module, string[] cmd) | ||
620 | { | ||
621 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); | ||
622 | cdt.AddColumn("UUID", 36); | ||
623 | cdt.AddColumn("Name", 30); | ||
624 | cdt.AddColumn("HomeURL", 40); | ||
625 | |||
626 | lock (m_UserCache) | ||
627 | { | ||
570 | foreach (KeyValuePair<UUID, UserData> kvp in m_UserCache) | 628 | foreach (KeyValuePair<UUID, UserData> kvp in m_UserCache) |
571 | { | 629 | cdt.AddRow(kvp.Key, string.Format("{0} {1}", kvp.Value.FirstName, kvp.Value.LastName), kvp.Value.HomeURL); |
572 | MainConsole.Instance.Output(String.Format("{0} {1} {2} ({3})", | ||
573 | kvp.Key, kvp.Value.FirstName, kvp.Value.LastName, kvp.Value.HomeURL)); | ||
574 | } | ||
575 | |||
576 | return; | ||
577 | } | 630 | } |
631 | |||
632 | MainConsole.Instance.Output(cdt.ToString()); | ||
578 | } | 633 | } |
579 | } | 634 | } |
580 | } \ No newline at end of file | 635 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 883045a..d093224 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | |||
@@ -369,6 +369,15 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
369 | }); | 369 | }); |
370 | } | 370 | } |
371 | 371 | ||
372 | public void SetSoundQueueing(UUID objectID, bool shouldQueue) | ||
373 | { | ||
374 | SceneObjectPart part; | ||
375 | if (!m_scene.TryGetSceneObjectPart(objectID, out part)) | ||
376 | return; | ||
377 | |||
378 | part.SoundQueueing = shouldQueue; | ||
379 | } | ||
380 | |||
372 | #endregion | 381 | #endregion |
373 | } | 382 | } |
374 | } | 383 | } |