diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/Avatar/AvatarServerConnector.cs (renamed from OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs) | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerConnector.cs index e80f6ab..9a57cd9 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs +++ b/OpenSim/Server/Handlers/Avatar/AvatarServerConnector.cs | |||
@@ -25,36 +25,37 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System.Reflection; | 28 | using System; |
29 | using log4net; | 29 | using Nini.Config; |
30 | using OpenSim.Data; | 30 | using OpenSim.Server.Base; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Services.Interfaces; |
32 | using OpenSim.Framework.Communications; | ||
33 | using OpenSim.Framework.Communications.Cache; | ||
34 | using OpenSim.Framework.Servers; | ||
35 | using OpenSim.Framework.Servers.HttpServer; | 32 | using OpenSim.Framework.Servers.HttpServer; |
36 | using OpenSim.Region.Communications.OGS1; | 33 | using OpenSim.Server.Handlers.Base; |
37 | using OpenSim.Region.Framework.Scenes; | ||
38 | 34 | ||
39 | namespace OpenSim.Region.Communications.Hypergrid | 35 | namespace OpenSim.Server.Handlers.Avatar |
40 | { | 36 | { |
41 | public class HGCommunicationsGridMode : CommunicationsManager // CommunicationsOGS1 | 37 | public class AvatarServiceConnector : ServiceConnector |
42 | { | 38 | { |
39 | private IAvatarService m_AvatarService; | ||
40 | private string m_ConfigName = "AvatarService"; | ||
43 | 41 | ||
44 | public HGCommunicationsGridMode( | 42 | public AvatarServiceConnector(IConfigSource config, IHttpServer server, string configName) : |
45 | NetworkServersInfo serversInfo, | 43 | base(config, server, configName) |
46 | SceneManager sman, LibraryRootFolder libraryRootFolder) | ||
47 | : base(serversInfo, libraryRootFolder) | ||
48 | { | 44 | { |
45 | IConfig serverConfig = config.Configs[m_ConfigName]; | ||
46 | if (serverConfig == null) | ||
47 | throw new Exception(String.Format("No section {0} in config file", m_ConfigName)); | ||
49 | 48 | ||
50 | HGUserServices userServices = new HGUserServices(this); | 49 | string avatarService = serverConfig.GetString("LocalServiceModule", |
51 | // This plugin arrangement could eventually be configurable rather than hardcoded here. | 50 | String.Empty); |
52 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); | 51 | |
53 | userServices.AddPlugin(new HGUserDataPlugin(this, userServices)); | 52 | if (avatarService == String.Empty) |
54 | 53 | throw new Exception("No LocalServiceModule in config file"); | |
55 | m_userService = userServices; | 54 | |
56 | m_messageService = userServices; | 55 | Object[] args = new Object[] { config }; |
57 | m_avatarService = userServices; | 56 | m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args); |
57 | |||
58 | server.AddStreamHandler(new AvatarServerPostHandler(m_AvatarService)); | ||
58 | } | 59 | } |
59 | } | 60 | } |
60 | } | 61 | } |