diff options
author | BlueWall | 2015-05-13 14:31:28 -0500 |
---|---|---|
committer | BlueWall | 2015-05-13 14:31:28 -0500 |
commit | 3c2886cd7507890b03f1213ca280c4a505af52c3 (patch) | |
tree | 8b0bdf9ae9ea74553691b7e1d446102c12cefbdd /OpenSim/Region | |
parent | Enable grab feature (Ctrl+Drag) for non-physical link-sets and add code to ha... (diff) | |
download | opensim-SC-3c2886cd7507890b03f1213ca280c4a505af52c3.zip opensim-SC-3c2886cd7507890b03f1213ca280c4a505af52c3.tar.gz opensim-SC-3c2886cd7507890b03f1213ca280c4a505af52c3.tar.bz2 opensim-SC-3c2886cd7507890b03f1213ca280c4a505af52c3.tar.xz |
Adding back command to clear region's user cache
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index ba71dc5..7ecbd26 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
154 | 154 | ||
155 | #endregion ISharedRegionModule | 155 | #endregion ISharedRegionModule |
156 | 156 | ||
157 | 157 | ||
158 | #region Event Handlers | 158 | #region Event Handlers |
159 | 159 | ||
160 | void EventManager_OnPrimsLoaded(Scene s) | 160 | void EventManager_OnPrimsLoaded(Scene s) |
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
180 | void HandleUUIDNameRequest(UUID uuid, IClientAPI client) | 180 | void HandleUUIDNameRequest(UUID uuid, IClientAPI client) |
181 | { | 181 | { |
182 | // m_log.DebugFormat( | 182 | // m_log.DebugFormat( |
183 | // "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", | 183 | // "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", |
184 | // uuid, remote_client.Name); | 184 | // uuid, remote_client.Name); |
185 | 185 | ||
186 | if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) | 186 | if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) |
@@ -212,7 +212,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
212 | // appear to clear this when the user asks it to clear the cache, but others may not. | 212 | // appear to clear this when the user asks it to clear the cache, but others may not. |
213 | // | 213 | // |
214 | // So to avoid clients | 214 | // So to avoid clients |
215 | // (particularly Hypergrid clients) permanently binding "Unknown User" to a given UUID, we will | 215 | // (particularly Hypergrid clients) permanently binding "Unknown User" to a given UUID, we will |
216 | // instead drop the request entirely. | 216 | // instead drop the request entirely. |
217 | if (GetUser(uuid, out user)) | 217 | if (GetUser(uuid, out user)) |
218 | { | 218 | { |
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
220 | } | 220 | } |
221 | // else | 221 | // else |
222 | // m_log.DebugFormat( | 222 | // m_log.DebugFormat( |
223 | // "[USER MANAGEMENT MODULE]: No bound name for {0} found, ignoring request from {1}", | 223 | // "[USER MANAGEMENT MODULE]: No bound name for {0} found, ignoring request from {1}", |
224 | // uuid, client.Name); | 224 | // uuid, client.Name); |
225 | }); | 225 | }); |
226 | } | 226 | } |
@@ -416,7 +416,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
416 | m_log.Debug("[USER MANAGEMENT MODULE]: GetServerURLs call failed ", e); | 416 | m_log.Debug("[USER MANAGEMENT MODULE]: GetServerURLs call failed ", e); |
417 | userdata.ServerURLs = new Dictionary<string, object>(); | 417 | userdata.ServerURLs = new Dictionary<string, object>(); |
418 | } | 418 | } |
419 | 419 | ||
420 | if (userdata.ServerURLs != null && userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null) | 420 | if (userdata.ServerURLs != null && userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null) |
421 | return userdata.ServerURLs[serverType].ToString(); | 421 | return userdata.ServerURLs[serverType].ToString(); |
422 | } | 422 | } |
@@ -620,7 +620,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
620 | AddUser(id, string.Empty, string.Empty, string.Empty); | 620 | AddUser(id, string.Empty, string.Empty, string.Empty); |
621 | } | 621 | } |
622 | else | 622 | else |
623 | { | 623 | { |
624 | string homeURL; | 624 | string homeURL; |
625 | string firstname = string.Empty; | 625 | string firstname = string.Empty; |
626 | string lastname = string.Empty; | 626 | string lastname = string.Empty; |
@@ -676,7 +676,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
676 | else | 676 | else |
677 | { | 677 | { |
678 | lock(m_UserCache) | 678 | lock(m_UserCache) |
679 | { | 679 | { |
680 | if(!m_UserCache.ContainsKey(id)) | 680 | if(!m_UserCache.ContainsKey(id)) |
681 | { | 681 | { |
682 | UserData newUser = new UserData(); | 682 | UserData newUser = new UserData(); |
@@ -726,6 +726,21 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
726 | "Show the bindings between user UUIDs and user names", | 726 | "Show the bindings between user UUIDs and user names", |
727 | String.Empty, | 727 | String.Empty, |
728 | HandleShowUsers); | 728 | HandleShowUsers); |
729 | |||
730 | MainConsole.Instance.Commands.AddCommand("Users", true, | ||
731 | "reset user cache", | ||
732 | "reset user cache", | ||
733 | "reset user cache to allow changed settings to be applied", | ||
734 | String.Empty, | ||
735 | HandleResetUserCache); | ||
736 | } | ||
737 | |||
738 | private void HandleResetUserCache(string module, string[] cmd) | ||
739 | { | ||
740 | lock(m_UserCache) | ||
741 | { | ||
742 | m_UserCache.Clear(); | ||
743 | } | ||
729 | } | 744 | } |
730 | 745 | ||
731 | private void HandleShowUser(string module, string[] cmd) | 746 | private void HandleShowUser(string module, string[] cmd) |