aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2011-01-24 02:16:28 +0100
committerMelanie2011-01-24 02:16:28 +0100
commitdbbf43663e688b136d806965edfb82b4cd9e3e91 (patch)
tree48a3ffa0bf6a29a80edb34632aabd3451fdf9a55 /OpenSim/Region/CoreModules
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC-dbbf43663e688b136d806965edfb82b4cd9e3e91.zip
opensim-SC-dbbf43663e688b136d806965edfb82b4cd9e3e91.tar.gz
opensim-SC-dbbf43663e688b136d806965edfb82b4cd9e3e91.tar.bz2
opensim-SC-dbbf43663e688b136d806965edfb82b4cd9e3e91.tar.xz
Add a careminster API to scripting again
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs11
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs13
2 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
index 3321b38..348ad42 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
@@ -33,6 +33,7 @@ using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
34using OpenSim.Services.Interfaces; 34using OpenSim.Services.Interfaces;
35using OpenSim.Services.Connectors; 35using OpenSim.Services.Connectors;
36using OpenSim.Framework;
36 37
37using OpenMetaverse; 38using OpenMetaverse;
38 39
@@ -101,6 +102,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
101 return; 102 return;
102 103
103 scene.RegisterModuleInterface<IUserAccountService>(this); 104 scene.RegisterModuleInterface<IUserAccountService>(this);
105
106 scene.EventManager.OnNewClient += OnNewClient;
104 } 107 }
105 108
106 public void RemoveRegion(Scene scene) 109 public void RemoveRegion(Scene scene)
@@ -115,6 +118,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
115 return; 118 return;
116 } 119 }
117 120
121 // When a user actually enters the sim, clear them from
122 // cache so the sim will have the current values for
123 // flags, title, etc. And country, don't forget country!
124 private void OnNewClient(IClientAPI client)
125 {
126 m_Cache.Remove(client.Name);
127 }
128
118 #region Overwritten methods from IUserAccountService 129 #region Overwritten methods from IUserAccountService
119 130
120 public override UserAccount GetUserAccount(UUID scopeID, UUID userID) 131 public override UserAccount GetUserAccount(UUID scopeID, UUID userID)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
index 155335b..07c127e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
@@ -91,5 +91,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
91 91
92 return null; 92 return null;
93 } 93 }
94
95 public void Remove(string name)
96 {
97 if (!m_NameCache.Contains(name))
98 return;
99
100 UUID uuid = UUID.Zero;
101 if (m_NameCache.TryGetValue(name, out uuid))
102 {
103 m_NameCache.Remove(name);
104 m_UUIDCache.Remove(uuid);
105 }
106 }
94 } 107 }
95} 108}