diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs (renamed from OpenSim/Region/Communications/Hypergrid/HGUserDataPlugin.cs) | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGUserDataPlugin.cs b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs index 4b8fc26..c951653 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGUserDataPlugin.cs +++ b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs | |||
@@ -27,46 +27,43 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.IO; |
31 | using System.Net; | ||
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using System.Text.RegularExpressions; | 32 | using System.Net; |
34 | using System.Xml.Serialization; | 33 | using System.Text; |
35 | using log4net; | 34 | |
36 | using Nwc.XmlRpc; | 35 | using OpenSim.Server.Base; |
37 | using OpenMetaverse; | 36 | using OpenSim.Server.Handlers.Base; |
38 | using OpenSim.Data; | 37 | using OpenSim.Services.Interfaces; |
38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Framework.Communications; | 40 | using OpenSim.Framework.Servers.HttpServer; |
41 | using OpenSim.Framework.Communications.Clients; | 41 | using OpenSim.Server.Handlers.Simulation; |
42 | using OpenSim.Region.Communications.OGS1; | 42 | using Utils = OpenSim.Server.Handlers.Simulation.Utils; |
43 | |||
44 | using OpenMetaverse; | ||
45 | using OpenMetaverse.StructuredData; | ||
46 | using Nini.Config; | ||
47 | using log4net; | ||
48 | |||
43 | 49 | ||
44 | namespace OpenSim.Region.Communications.Hypergrid | 50 | namespace OpenSim.Server.Handlers.Hypergrid |
45 | { | 51 | { |
46 | public class HGUserDataPlugin : OGS1UserDataPlugin | 52 | public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentHandler |
47 | { | 53 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | private IGatekeeperService m_GatekeeperService; | ||
49 | 56 | ||
50 | HGUserServices m_UserServices; | 57 | public GatekeeperAgentHandler(IGatekeeperService gatekeeper) |
51 | |||
52 | public HGUserDataPlugin() | ||
53 | { | 58 | { |
59 | m_GatekeeperService = gatekeeper; | ||
54 | } | 60 | } |
55 | 61 | ||
56 | public HGUserDataPlugin(CommunicationsManager commsManager, HGUserServices userServices) | 62 | protected override bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, out string reason) |
57 | { | 63 | { |
58 | m_log.DebugFormat("[HG USER SERVICES]: {0} initialized", Name); | 64 | return m_GatekeeperService.LoginAgent(aCircuit, destination, out reason); |
59 | m_commsManager = commsManager; | ||
60 | m_UserServices = userServices; | ||
61 | } | ||
62 | |||
63 | protected override string GetUserServerURL(UUID userID) | ||
64 | { | ||
65 | string url = string.Empty; | ||
66 | if (m_UserServices.IsForeignUser(userID, out url)) | ||
67 | return url; | ||
68 | return m_commsManager.NetworkServersInfo.UserURL; | ||
69 | } | 65 | } |
70 | 66 | ||
71 | } | 67 | } |
68 | |||
72 | } | 69 | } |