mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Add a careminster API to scripting again
This commit is contained in:
@@ -33,6 +33,7 @@ using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Services.Connectors;
|
||||
using OpenSim.Framework;
|
||||
|
||||
using OpenMetaverse;
|
||||
|
||||
@@ -101,6 +102,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
return;
|
||||
|
||||
scene.RegisterModuleInterface<IUserAccountService>(this);
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
@@ -115,6 +118,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
return;
|
||||
}
|
||||
|
||||
// When a user actually enters the sim, clear them from
|
||||
// cache so the sim will have the current values for
|
||||
// flags, title, etc. And country, don't forget country!
|
||||
private void OnNewClient(IClientAPI client)
|
||||
{
|
||||
m_Cache.Remove(client.Name);
|
||||
}
|
||||
|
||||
#region Overwritten methods from IUserAccountService
|
||||
|
||||
public override UserAccount GetUserAccount(UUID scopeID, UUID userID)
|
||||
|
||||
@@ -91,5 +91,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Remove(string name)
|
||||
{
|
||||
if (!m_NameCache.Contains(name))
|
||||
return;
|
||||
|
||||
UUID uuid = UUID.Zero;
|
||||
if (m_NameCache.TryGetValue(name, out uuid))
|
||||
{
|
||||
m_NameCache.Remove(name);
|
||||
m_UUIDCache.Remove(uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user