Correctly create a freshly created estate owner's default items and avatar entries on standalone if applicable.

This commit is contained in:
Justin Clark-Casey (justincc)
2011-09-16 00:12:12 +01:00
parent c4efb97d49
commit 522d6261f1
5 changed files with 70 additions and 94 deletions

View File

@@ -45,7 +45,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
private IUserAccountService m_UserService;
/// <summary>
/// This is not on the IUserAccountService. It's only being used so that standalone scenes can punch through
/// to a local UserAccountService when setting up an estate manager.
/// </summary>
public IUserAccountService UserAccountService { get; private set; }
private UserAccountCache m_Cache;
private bool m_Enabled = false;
@@ -86,9 +91,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
}
Object[] args = new Object[] { source };
m_UserService = ServerUtils.LoadPlugin<IUserAccountService>(serviceDll, args);
UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(serviceDll, args);
if (m_UserService == null)
if (UserAccountService == null)
{
m_log.ErrorFormat(
"[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Cannot load user account service specified as {0}", serviceDll);
@@ -119,7 +124,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
if (!m_Enabled)
return;
scene.RegisterModuleInterface<IUserAccountService>(m_UserService);
scene.RegisterModuleInterface<IUserAccountService>(UserAccountService);
}
public void RemoveRegion(Scene scene)
@@ -147,7 +152,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
if (inCache)
return account;
account = m_UserService.GetUserAccount(scopeID, userID);
account = UserAccountService.GetUserAccount(scopeID, userID);
m_Cache.Cache(userID, account);
return account;
@@ -160,7 +165,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
if (inCache)
return account;
account = m_UserService.GetUserAccount(scopeID, firstName, lastName);
account = UserAccountService.GetUserAccount(scopeID, firstName, lastName);
if (account != null)
m_Cache.Cache(account.PrincipalID, account);
@@ -169,22 +174,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
public UserAccount GetUserAccount(UUID scopeID, string Email)
{
return m_UserService.GetUserAccount(scopeID, Email);
return UserAccountService.GetUserAccount(scopeID, Email);
}
public List<UserAccount> GetUserAccounts(UUID scopeID, string query)
{
return m_UserService.GetUserAccounts(scopeID, query);
return UserAccountService.GetUserAccounts(scopeID, query);
}
// Update all updatable fields
//
public bool StoreUserAccount(UserAccount data)
{
return m_UserService.StoreUserAccount(data);
return UserAccountService.StoreUserAccount(data);
}
#endregion
}
}
}