aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorTom2011-01-26 16:25:08 -0800
committerTom2011-01-26 16:25:08 -0800
commit6b27587bc7631d6fd083f3b4f752d9ddcfda4830 (patch)
tree743dd62eb392e4ec95b76c92918289995c15fa5d /OpenSim/Region/CoreModules
parentAdd userFlags check to isBanned. This checks bans against DenyAnonymous and D... (diff)
downloadopensim-SC-6b27587bc7631d6fd083f3b4f752d9ddcfda4830.zip
opensim-SC-6b27587bc7631d6fd083f3b4f752d9ddcfda4830.tar.gz
opensim-SC-6b27587bc7631d6fd083f3b4f752d9ddcfda4830.tar.bz2
opensim-SC-6b27587bc7631d6fd083f3b4f752d9ddcfda4830.tar.xz
Add a "useCached" parameter to GetUserAccount. Add a function to Scene to get the user flags. It has to be here due to access restrictions :/
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs7
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs17
2 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index cbc2fd6..5c5cb70 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -88,12 +88,7 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
88 88
89 public void AddCapsHandler(UUID agentId) 89 public void AddCapsHandler(UUID agentId)
90 { 90 {
91 int flags = 0; 91 int flags = m_scene.GetUserFlags(agentId);
92 ScenePresence sp;
93 if (m_scene.TryGetScenePresence(agentId, out sp))
94 {
95 flags = sp.UserFlags;
96 }
97 if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId, flags)) 92 if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId, flags))
98 return; 93 return;
99 94
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
index 9ecbcc6..54340e6 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
@@ -142,10 +142,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
142 142
143 public UserAccount GetUserAccount(UUID scopeID, UUID userID) 143 public UserAccount GetUserAccount(UUID scopeID, UUID userID)
144 { 144 {
145 bool inCache = false; 145 return GetUserAccount(scopeID, userID, true);
146 UserAccount account = m_Cache.Get(userID, out inCache); 146 }
147 if (inCache) 147
148 return account; 148 public UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache)
149 {
150 UserAccount account;
151 if (useCache)
152 {
153 bool inCache = false;
154 account = m_Cache.Get(userID, out inCache);
155 if (inCache)
156 return account;
157 }
149 158
150 account = m_UserService.GetUserAccount(scopeID, userID); 159 account = m_UserService.GetUserAccount(scopeID, userID);
151 m_Cache.Cache(userID, account); 160 m_Cache.Cache(userID, account);