diff options
author | Melanie Thielker | 2009-06-22 13:14:48 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-06-22 13:14:48 +0000 |
commit | 77ebb7c9f30acaad1cc44a2bce799d05282a5f48 (patch) | |
tree | be420f70ce4601ad6529c5537de3e1dfc3075811 /OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs | |
parent | Committing the meat of the user server interface and the bones of the service... (diff) | |
download | opensim-SC_OLD-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.zip opensim-SC_OLD-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.tar.gz opensim-SC_OLD-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.tar.bz2 opensim-SC_OLD-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.tar.xz |
Committing RemoteUserServiceConnector out connector, local user service
connector and the glue code.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs index 00a2478..2e9739b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs | |||
@@ -26,14 +26,22 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using Nini.Config; | 28 | using Nini.Config; |
29 | using log4net; | ||
30 | using System.Reflection; | ||
29 | using OpenSim.Region.Framework.Interfaces; | 31 | using OpenSim.Region.Framework.Interfaces; |
30 | using OpenSim.Region.Framework.Scenes; | 32 | using OpenSim.Region.Framework.Scenes; |
31 | using OpenSim.Services.Interfaces; | 33 | using OpenSim.Services.Interfaces; |
34 | using OpenSim.Services.Connectors; | ||
32 | 35 | ||
33 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | 36 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User |
34 | { | 37 | { |
35 | public class RemoteUserServicesConnector : ISharedRegionModule | 38 | public class RemoteUserServicesConnector : UserServicesConnector, |
39 | ISharedRegionModule, IUserDataService | ||
36 | { | 40 | { |
41 | private static readonly ILog m_log = | ||
42 | LogManager.GetLogger( | ||
43 | MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
37 | private bool m_Enabled = false; | 45 | private bool m_Enabled = false; |
38 | 46 | ||
39 | public string Name | 47 | public string Name |
@@ -41,7 +49,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | |||
41 | get { return "RemoteUserServicesConnector"; } | 49 | get { return "RemoteUserServicesConnector"; } |
42 | } | 50 | } |
43 | 51 | ||
44 | public void Initialise(IConfigSource source) | 52 | public override void Initialise(IConfigSource source) |
45 | { | 53 | { |
46 | IConfig moduleConfig = source.Configs["Modules"]; | 54 | IConfig moduleConfig = source.Configs["Modules"]; |
47 | if (moduleConfig != null) | 55 | if (moduleConfig != null) |
@@ -49,7 +57,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | |||
49 | string name = moduleConfig.GetString("UserServices", ""); | 57 | string name = moduleConfig.GetString("UserServices", ""); |
50 | if (name == Name) | 58 | if (name == Name) |
51 | { | 59 | { |
60 | IConfig userConfig = source.Configs["UserService"]; | ||
61 | if (userConfig == null) | ||
62 | { | ||
63 | m_log.Error("[USER CONNECTOR]: UserService missing from OpanSim.ini"); | ||
64 | return; | ||
65 | } | ||
66 | |||
52 | m_Enabled = true; | 67 | m_Enabled = true; |
68 | |||
69 | base.Initialise(source); | ||
70 | |||
71 | m_log.Info("[USER CONNECTOR]: Remote users enabled"); | ||
53 | } | 72 | } |
54 | } | 73 | } |
55 | } | 74 | } |
@@ -70,6 +89,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | |||
70 | { | 89 | { |
71 | if (!m_Enabled) | 90 | if (!m_Enabled) |
72 | return; | 91 | return; |
92 | |||
93 | scene.RegisterModuleInterface<IUserDataService>(this); | ||
73 | } | 94 | } |
74 | 95 | ||
75 | public void RemoveRegion(Scene scene) | 96 | public void RemoveRegion(Scene scene) |