diff options
Diffstat (limited to '')
6 files changed, 43 insertions, 22 deletions
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 7b84d55..97a0afc 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs | |||
@@ -96,7 +96,9 @@ namespace OpenSim.Services.HypergridService | |||
96 | UUID.TryParse(scope, out m_ScopeID); | 96 | UUID.TryParse(scope, out m_ScopeID); |
97 | //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); | 97 | //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); |
98 | m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); | 98 | m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); |
99 | m_ExternalName = serverConfig.GetString("ExternalName", string.Empty); | 99 | m_ExternalName = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
100 | new string[] { "Startup", "Hypergrid", "GatekeeperService" }, String.Empty); | ||
101 | m_ExternalName = serverConfig.GetString("ExternalName", m_ExternalName); | ||
100 | if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/")) | 102 | if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/")) |
101 | m_ExternalName = m_ExternalName + "/"; | 103 | m_ExternalName = m_ExternalName + "/"; |
102 | 104 | ||
diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs index 0c9cfd3..e8d7cca 100644 --- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs +++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs | |||
@@ -61,13 +61,13 @@ namespace OpenSim.Services.HypergridService | |||
61 | protected static IGridService m_GridService; | 61 | protected static IGridService m_GridService; |
62 | protected static IPresenceService m_PresenceService; | 62 | protected static IPresenceService m_PresenceService; |
63 | protected static IUserAgentService m_UserAgentService; | 63 | protected static IUserAgentService m_UserAgentService; |
64 | protected static IOfflineIMService m_OfflineIMService; | ||
64 | 65 | ||
65 | protected static IInstantMessageSimConnector m_IMSimConnector; | 66 | protected static IInstantMessageSimConnector m_IMSimConnector; |
66 | 67 | ||
67 | protected static Dictionary<UUID, object> m_UserLocationMap = new Dictionary<UUID, object>(); | 68 | protected static Dictionary<UUID, object> m_UserLocationMap = new Dictionary<UUID, object>(); |
68 | private static ExpiringCache<UUID, GridRegion> m_RegionCache; | 69 | private static ExpiringCache<UUID, GridRegion> m_RegionCache; |
69 | 70 | ||
70 | private static string m_RestURL; | ||
71 | private static bool m_ForwardOfflineGroupMessages; | 71 | private static bool m_ForwardOfflineGroupMessages; |
72 | private static bool m_InGatekeeper; | 72 | private static bool m_InGatekeeper; |
73 | 73 | ||
@@ -111,9 +111,14 @@ namespace OpenSim.Services.HypergridService | |||
111 | return; | 111 | return; |
112 | } | 112 | } |
113 | 113 | ||
114 | m_RestURL = cnf.GetString("OfflineMessageURL", string.Empty); | ||
115 | m_ForwardOfflineGroupMessages = cnf.GetBoolean("ForwardOfflineGroupMessages", false); | 114 | m_ForwardOfflineGroupMessages = cnf.GetBoolean("ForwardOfflineGroupMessages", false); |
116 | 115 | ||
116 | if (m_InGatekeeper) | ||
117 | { | ||
118 | string offlineIMService = cnf.GetString("OfflineIMService", string.Empty); | ||
119 | if (offlineIMService != string.Empty) | ||
120 | m_OfflineIMService = ServerUtils.LoadPlugin<IOfflineIMService>(offlineIMService, args); | ||
121 | } | ||
117 | } | 122 | } |
118 | } | 123 | } |
119 | 124 | ||
@@ -329,18 +334,28 @@ namespace OpenSim.Services.HypergridService | |||
329 | 334 | ||
330 | private bool UndeliveredMessage(GridInstantMessage im) | 335 | private bool UndeliveredMessage(GridInstantMessage im) |
331 | { | 336 | { |
332 | if (m_RestURL != string.Empty && (im.offline != 0) | 337 | if (m_OfflineIMService == null) |
333 | && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) | 338 | return false; |
334 | { | ||
335 | // m_log.DebugFormat("[HG IM SERVICE]: Message saved"); | ||
336 | 339 | ||
337 | return SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | 340 | if (im.dialog != (byte)InstantMessageDialog.MessageFromObject && |
338 | "POST", m_RestURL + "/SaveMessage/", im); | 341 | im.dialog != (byte)InstantMessageDialog.MessageFromAgent && |
339 | } | 342 | im.dialog != (byte)InstantMessageDialog.GroupNotice && |
340 | else | 343 | im.dialog != (byte)InstantMessageDialog.GroupInvitation && |
344 | im.dialog != (byte)InstantMessageDialog.InventoryOffered) | ||
341 | { | 345 | { |
342 | return false; | 346 | return false; |
343 | } | 347 | } |
348 | |||
349 | if (!m_ForwardOfflineGroupMessages) | ||
350 | { | ||
351 | if (im.dialog == (byte)InstantMessageDialog.GroupNotice || | ||
352 | im.dialog == (byte)InstantMessageDialog.GroupInvitation) | ||
353 | return false; | ||
354 | } | ||
355 | |||
356 | // m_log.DebugFormat("[HG IM SERVICE]: Message saved"); | ||
357 | string reason = string.Empty; | ||
358 | return m_OfflineIMService.StoreMessage(im, out reason); | ||
344 | } | 359 | } |
345 | } | 360 | } |
346 | } \ No newline at end of file | 361 | } \ No newline at end of file |
diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index 2e9bd40..326e68d 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs | |||
@@ -81,10 +81,8 @@ namespace OpenSim.Services.HypergridService | |||
81 | if (m_UserAccountService == null) | 81 | if (m_UserAccountService == null) |
82 | throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); | 82 | throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); |
83 | 83 | ||
84 | // legacy configuration [obsolete] | 84 | m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI", |
85 | m_HomeURL = invConfig.GetString("ProfileServerURI", string.Empty); | 85 | new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty); |
86 | // Preferred | ||
87 | m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL); | ||
88 | 86 | ||
89 | m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); | 87 | m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); |
90 | } | 88 | } |
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 784f136..eecf757 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | |||
@@ -96,8 +96,8 @@ namespace OpenSim.Services.HypergridService | |||
96 | if (m_AvatarService == null) | 96 | if (m_AvatarService == null) |
97 | throw new Exception(String.Format("Unable to create m_AvatarService from {0}", avatarDll)); | 97 | throw new Exception(String.Format("Unable to create m_AvatarService from {0}", avatarDll)); |
98 | 98 | ||
99 | // Preferred | 99 | m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI", |
100 | m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL); | 100 | new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty); |
101 | 101 | ||
102 | // m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); | 102 | // m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); |
103 | } | 103 | } |
diff --git a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs index 49f2176..8d66f1b 100644 --- a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 416ad16..ec76508 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -131,12 +131,18 @@ namespace OpenSim.Services.HypergridService | |||
131 | LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_TripsAllowedExceptions); | 131 | LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_TripsAllowedExceptions); |
132 | LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_TripsDisallowedExceptions); | 132 | LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_TripsDisallowedExceptions); |
133 | 133 | ||
134 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); | 134 | m_GridName = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
135 | if (m_GridName == string.Empty) | 135 | new string[] { "Startup", "Hypergrid", "UserAgentService" }, String.Empty); |
136 | if (string.IsNullOrEmpty(m_GridName)) // Legacy. Remove soon. | ||
136 | { | 137 | { |
137 | serverConfig = config.Configs["GatekeeperService"]; | ||
138 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); | 138 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); |
139 | if (m_GridName == string.Empty) | ||
140 | { | ||
141 | serverConfig = config.Configs["GatekeeperService"]; | ||
142 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); | ||
143 | } | ||
139 | } | 144 | } |
145 | |||
140 | if (!m_GridName.EndsWith("/")) | 146 | if (!m_GridName.EndsWith("/")) |
141 | m_GridName = m_GridName + "/"; | 147 | m_GridName = m_GridName + "/"; |
142 | 148 | ||