32 using System.Reflection;
33 using OpenSim.Region.Framework.Interfaces;
34 using OpenSim.Region.Framework.Scenes;
35 using OpenSim.Services.Interfaces;
36 using OpenSim.Services.Connectors;
37 using OpenSim.Framework;
41 namespace OpenSim.
Region.CoreModules.ServiceConnectorsOut.UserAccounts
43 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"RemoteUserAccountServicesConnector")]
47 private static readonly ILog m_log =
49 MethodBase.GetCurrentMethod().DeclaringType);
51 private bool m_Enabled =
false;
54 public Type ReplaceableInterface
61 get {
return "RemoteUserAccountServicesConnector"; }
66 IConfig moduleConfig = source.Configs[
"Modules"];
67 if (moduleConfig != null)
69 string name = moduleConfig.GetString(
"UserAccountServices",
"");
72 IConfig userConfig = source.Configs[
"UserAccountService"];
73 if (userConfig == null)
75 m_log.Error(
"[USER CONNECTOR]: UserAccountService missing from OpenSim.ini");
81 base.Initialise(source);
84 m_log.Info(
"[USER CONNECTOR]: Remote users enabled");
109 scene.EventManager.OnNewClient += OnNewClient;
129 m_Cache.Remove(client.Name);
132 #region Overwritten methods from IUserAccountService
136 bool inCache =
false;
137 UserAccount account = m_Cache.Get(userID, out inCache);
141 account = base.GetUserAccount(scopeID, userID);
142 m_Cache.Cache(userID, account);
149 bool inCache =
false;
150 UserAccount account = m_Cache.Get(firstName +
" " + lastName, out inCache);
154 account = base.GetUserAccount(scopeID, firstName, lastName);
156 m_Cache.Cache(account.PrincipalID, account);
void AddRegion(Scene scene)
This is called whenever a Scene is added. For shared modules, this can happen several times...
void RegionLoaded(Scene scene)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...
void RemoveRegion(Scene scene)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
void PostInitialise()
This is called exactly once after all the shared region-modules have been instanciated and IRegionMod...
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
override void Initialise(IConfigSource source)
override UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName)
override UserAccount GetUserAccount(UUID scopeID, UUID userID)
override bool StoreUserAccount(UserAccount data)
Store the data given, wich replaces the stored data, therefore must be complete.