diff options
author | Justin Clark-Casey (justincc) | 2011-09-16 00:12:12 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-16 00:12:12 +0100 |
commit | 522d6261f11ffaf8320c3f0775beb5d0608ce226 (patch) | |
tree | 156395f407ca56551784aa630b53286d14bbcf32 /OpenSim/Region/CoreModules | |
parent | Write code to create minimum necessary body parts/clothing and avatar entries... (diff) | |
download | opensim-SC-522d6261f11ffaf8320c3f0775beb5d0608ce226.zip opensim-SC-522d6261f11ffaf8320c3f0775beb5d0608ce226.tar.gz opensim-SC-522d6261f11ffaf8320c3f0775beb5d0608ce226.tar.bz2 opensim-SC-522d6261f11ffaf8320c3f0775beb5d0608ce226.tar.xz |
Correctly create a freshly created estate owner's default items and avatar entries on standalone if applicable.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index 30ebb21..546fe88 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | |||
@@ -45,7 +45,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
45 | LogManager.GetLogger( | 45 | LogManager.GetLogger( |
46 | MethodBase.GetCurrentMethod().DeclaringType); | 46 | MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | private IUserAccountService m_UserService; | 48 | /// <summary> |
49 | /// This is not on the IUserAccountService. It's only being used so that standalone scenes can punch through | ||
50 | /// to a local UserAccountService when setting up an estate manager. | ||
51 | /// </summary> | ||
52 | public IUserAccountService UserAccountService { get; private set; } | ||
53 | |||
49 | private UserAccountCache m_Cache; | 54 | private UserAccountCache m_Cache; |
50 | 55 | ||
51 | private bool m_Enabled = false; | 56 | private bool m_Enabled = false; |
@@ -86,9 +91,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
86 | } | 91 | } |
87 | 92 | ||
88 | Object[] args = new Object[] { source }; | 93 | Object[] args = new Object[] { source }; |
89 | m_UserService = ServerUtils.LoadPlugin<IUserAccountService>(serviceDll, args); | 94 | UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(serviceDll, args); |
90 | 95 | ||
91 | if (m_UserService == null) | 96 | if (UserAccountService == null) |
92 | { | 97 | { |
93 | m_log.ErrorFormat( | 98 | m_log.ErrorFormat( |
94 | "[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Cannot load user account service specified as {0}", serviceDll); | 99 | "[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Cannot load user account service specified as {0}", serviceDll); |
@@ -119,7 +124,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
119 | if (!m_Enabled) | 124 | if (!m_Enabled) |
120 | return; | 125 | return; |
121 | 126 | ||
122 | scene.RegisterModuleInterface<IUserAccountService>(m_UserService); | 127 | scene.RegisterModuleInterface<IUserAccountService>(UserAccountService); |
123 | } | 128 | } |
124 | 129 | ||
125 | public void RemoveRegion(Scene scene) | 130 | public void RemoveRegion(Scene scene) |
@@ -147,7 +152,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
147 | if (inCache) | 152 | if (inCache) |
148 | return account; | 153 | return account; |
149 | 154 | ||
150 | account = m_UserService.GetUserAccount(scopeID, userID); | 155 | account = UserAccountService.GetUserAccount(scopeID, userID); |
151 | m_Cache.Cache(userID, account); | 156 | m_Cache.Cache(userID, account); |
152 | 157 | ||
153 | return account; | 158 | return account; |
@@ -160,7 +165,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
160 | if (inCache) | 165 | if (inCache) |
161 | return account; | 166 | return account; |
162 | 167 | ||
163 | account = m_UserService.GetUserAccount(scopeID, firstName, lastName); | 168 | account = UserAccountService.GetUserAccount(scopeID, firstName, lastName); |
164 | if (account != null) | 169 | if (account != null) |
165 | m_Cache.Cache(account.PrincipalID, account); | 170 | m_Cache.Cache(account.PrincipalID, account); |
166 | 171 | ||
@@ -169,22 +174,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
169 | 174 | ||
170 | public UserAccount GetUserAccount(UUID scopeID, string Email) | 175 | public UserAccount GetUserAccount(UUID scopeID, string Email) |
171 | { | 176 | { |
172 | return m_UserService.GetUserAccount(scopeID, Email); | 177 | return UserAccountService.GetUserAccount(scopeID, Email); |
173 | } | 178 | } |
174 | 179 | ||
175 | public List<UserAccount> GetUserAccounts(UUID scopeID, string query) | 180 | public List<UserAccount> GetUserAccounts(UUID scopeID, string query) |
176 | { | 181 | { |
177 | return m_UserService.GetUserAccounts(scopeID, query); | 182 | return UserAccountService.GetUserAccounts(scopeID, query); |
178 | } | 183 | } |
179 | 184 | ||
180 | // Update all updatable fields | 185 | // Update all updatable fields |
181 | // | 186 | // |
182 | public bool StoreUserAccount(UserAccount data) | 187 | public bool StoreUserAccount(UserAccount data) |
183 | { | 188 | { |
184 | return m_UserService.StoreUserAccount(data); | 189 | return UserAccountService.StoreUserAccount(data); |
185 | } | 190 | } |
186 | 191 | ||
187 | #endregion | 192 | #endregion |
188 | |||
189 | } | 193 | } |
190 | } | 194 | } \ No newline at end of file |