diff options
author | Melanie | 2010-03-03 02:07:03 +0000 |
---|---|---|
committer | Melanie | 2010-03-03 02:07:03 +0000 |
commit | 028a87fe37002e7a0611f66babf1deee46c83804 (patch) | |
tree | 387aec499fd60c2012bed8148e6a2ddc847c3d95 /OpenSim/Region/OptionalModules | |
parent | Revert "test" (diff) | |
parent | Fixes Region.Framework tests. Although these tests don't fail, they need to b... (diff) | |
download | opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.zip opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.gz opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.bz2 opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.xz |
Merge branch 'master' into careminster-presence-refactor
This brings careminster on the level of master. To be tested
Diffstat (limited to 'OpenSim/Region/OptionalModules')
17 files changed, 140 insertions, 144 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index cc38a30..99e5b84 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -627,6 +627,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
627 | set { if (!value) Disconnect("IsActive Disconnected?"); } | 627 | set { if (!value) Disconnect("IsActive Disconnected?"); } |
628 | } | 628 | } |
629 | 629 | ||
630 | public bool IsLoggingOut | ||
631 | { | ||
632 | get { return false; } | ||
633 | set { } | ||
634 | } | ||
635 | |||
630 | public bool SendLogoutPacketWhenClosing | 636 | public bool SendLogoutPacketWhenClosing |
631 | { | 637 | { |
632 | set { } | 638 | set { } |
@@ -673,7 +679,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
673 | public event DeRezObject OnDeRezObject; | 679 | public event DeRezObject OnDeRezObject; |
674 | public event Action<IClientAPI> OnRegionHandShakeReply; | 680 | public event Action<IClientAPI> OnRegionHandShakeReply; |
675 | public event GenericCall2 OnRequestWearables; | 681 | public event GenericCall2 OnRequestWearables; |
676 | public event GenericCall2 OnCompleteMovementToRegion; | 682 | public event GenericCall1 OnCompleteMovementToRegion; |
677 | public event UpdateAgent OnAgentUpdate; | 683 | public event UpdateAgent OnAgentUpdate; |
678 | public event AgentRequestSit OnAgentRequestSit; | 684 | public event AgentRequestSit OnAgentRequestSit; |
679 | public event AgentSit OnAgentSit; | 685 | public event AgentSit OnAgentSit; |
@@ -774,6 +780,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
774 | public event UUIDNameRequest OnTeleportHomeRequest; | 780 | public event UUIDNameRequest OnTeleportHomeRequest; |
775 | public event ScriptAnswer OnScriptAnswer; | 781 | public event ScriptAnswer OnScriptAnswer; |
776 | public event AgentSit OnUndo; | 782 | public event AgentSit OnUndo; |
783 | public event AgentSit OnRedo; | ||
784 | public event LandUndo OnLandUndo; | ||
777 | public event ForceReleaseControls OnForceReleaseControls; | 785 | public event ForceReleaseControls OnForceReleaseControls; |
778 | public event GodLandStatRequest OnLandStatRequest; | 786 | public event GodLandStatRequest OnLandStatRequest; |
779 | public event DetailedEstateDataRequest OnDetailedEstateDataRequest; | 787 | public event DetailedEstateDataRequest OnDetailedEstateDataRequest; |
@@ -905,7 +913,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
905 | 913 | ||
906 | if (OnCompleteMovementToRegion != null) | 914 | if (OnCompleteMovementToRegion != null) |
907 | { | 915 | { |
908 | OnCompleteMovementToRegion(); | 916 | OnCompleteMovementToRegion(this); |
909 | } | 917 | } |
910 | } | 918 | } |
911 | 919 | ||
@@ -1667,5 +1675,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1667 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | 1675 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) |
1668 | { | 1676 | { |
1669 | } | 1677 | } |
1678 | |||
1679 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | ||
1680 | { | ||
1681 | } | ||
1670 | } | 1682 | } |
1671 | } | 1683 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs index b3fa07f..66265d8 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs | |||
@@ -483,12 +483,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
483 | case "%host" : | 483 | case "%host" : |
484 | result = result.Replace(vvar, rs.Host); | 484 | result = result.Replace(vvar, rs.Host); |
485 | break; | 485 | break; |
486 | case "%master1" : | ||
487 | result = result.Replace(vvar, rs.MA1); | ||
488 | break; | ||
489 | case "%master2" : | ||
490 | result = result.Replace(vvar, rs.MA2); | ||
491 | break; | ||
492 | case "%locx" : | 486 | case "%locx" : |
493 | result = result.Replace(vvar, rs.LocX); | 487 | result = result.Replace(vvar, rs.LocX); |
494 | break; | 488 | break; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs index 773507c..53b103e 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs | |||
@@ -57,8 +57,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
57 | internal string Host = String.Empty; | 57 | internal string Host = String.Empty; |
58 | internal string LocX = String.Empty; | 58 | internal string LocX = String.Empty; |
59 | internal string LocY = String.Empty; | 59 | internal string LocY = String.Empty; |
60 | internal string MA1 = String.Empty; | ||
61 | internal string MA2 = String.Empty; | ||
62 | internal string IDK = String.Empty; | 60 | internal string IDK = String.Empty; |
63 | 61 | ||
64 | // System values - used only be the IRC classes themselves | 62 | // System values - used only be the IRC classes themselves |
@@ -85,8 +83,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
85 | Host = scene.RegionInfo.ExternalHostName; | 83 | Host = scene.RegionInfo.ExternalHostName; |
86 | LocX = Convert.ToString(scene.RegionInfo.RegionLocX); | 84 | LocX = Convert.ToString(scene.RegionInfo.RegionLocX); |
87 | LocY = Convert.ToString(scene.RegionInfo.RegionLocY); | 85 | LocY = Convert.ToString(scene.RegionInfo.RegionLocY); |
88 | MA1 = scene.RegionInfo.MasterAvatarFirstName; | ||
89 | MA2 = scene.RegionInfo.MasterAvatarLastName; | ||
90 | IDK = Convert.ToString(_idk_++); | 86 | IDK = Convert.ToString(_idk_++); |
91 | 87 | ||
92 | // OpenChannel conditionally establishes a connection to the | 88 | // OpenChannel conditionally establishes a connection to the |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index b04b076..242bc3f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -41,7 +41,7 @@ using log4net; | |||
41 | using Nini.Config; | 41 | using Nini.Config; |
42 | using Nwc.XmlRpc; | 42 | using Nwc.XmlRpc; |
43 | using OpenSim.Framework; | 43 | using OpenSim.Framework; |
44 | using OpenSim.Framework.Communications.Cache; | 44 | |
45 | using OpenSim.Framework.Capabilities; | 45 | using OpenSim.Framework.Capabilities; |
46 | using OpenSim.Framework.Servers; | 46 | using OpenSim.Framework.Servers; |
47 | using OpenSim.Framework.Servers.HttpServer; | 47 | using OpenSim.Framework.Servers.HttpServer; |
@@ -50,7 +50,6 @@ using OpenSim.Region.Framework.Scenes; | |||
50 | using Caps = OpenSim.Framework.Capabilities.Caps; | 50 | using Caps = OpenSim.Framework.Capabilities.Caps; |
51 | using System.Text.RegularExpressions; | 51 | using System.Text.RegularExpressions; |
52 | 52 | ||
53 | |||
54 | namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | 53 | namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice |
55 | { | 54 | { |
56 | public class FreeSwitchVoiceModule : IRegionModule, IVoiceModule | 55 | public class FreeSwitchVoiceModule : IRegionModule, IVoiceModule |
@@ -76,7 +75,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
76 | // SLVoice client will do a GET on this prefix | 75 | // SLVoice client will do a GET on this prefix |
77 | private static string m_freeSwitchAPIPrefix; | 76 | private static string m_freeSwitchAPIPrefix; |
78 | 77 | ||
79 | // We need to return some information to SLVoice | 78 | // We need to return some information to SLVoice |
80 | // figured those out via curl | 79 | // figured those out via curl |
81 | // http://vd1.vivox.com/api2/viv_get_prelogin.php | 80 | // http://vd1.vivox.com/api2/viv_get_prelogin.php |
82 | // | 81 | // |
@@ -102,9 +101,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
102 | 101 | ||
103 | private readonly Dictionary<string, string> m_UUIDName = new Dictionary<string, string>(); | 102 | private readonly Dictionary<string, string> m_UUIDName = new Dictionary<string, string>(); |
104 | private Dictionary<string, string> m_ParcelAddress = new Dictionary<string, string>(); | 103 | private Dictionary<string, string> m_ParcelAddress = new Dictionary<string, string>(); |
105 | 104 | ||
106 | private Scene m_scene; | 105 | private Scene m_scene; |
107 | 106 | ||
108 | 107 | ||
109 | private IConfig m_config; | 108 | private IConfig m_config; |
110 | 109 | ||
@@ -136,9 +135,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
136 | m_freeSwitchServerUser = m_config.GetString("freeswitch_server_user", String.Empty); | 135 | m_freeSwitchServerUser = m_config.GetString("freeswitch_server_user", String.Empty); |
137 | m_freeSwitchServerPass = m_config.GetString("freeswitch_server_pass", String.Empty); | 136 | m_freeSwitchServerPass = m_config.GetString("freeswitch_server_pass", String.Empty); |
138 | m_freeSwitchAPIPrefix = m_config.GetString("freeswitch_api_prefix", String.Empty); | 137 | m_freeSwitchAPIPrefix = m_config.GetString("freeswitch_api_prefix", String.Empty); |
139 | 138 | ||
140 | // XXX: get IP address of HTTP server. (This can be this OpenSim server or another, or could be a dedicated grid service or may live on the freeswitch server) | 139 | // XXX: get IP address of HTTP server. (This can be this OpenSim server or another, or could be a dedicated grid service or may live on the freeswitch server) |
141 | 140 | ||
142 | string serviceIP = m_config.GetString("freeswitch_service_server", String.Empty); | 141 | string serviceIP = m_config.GetString("freeswitch_service_server", String.Empty); |
143 | int servicePort = m_config.GetInt("freeswitch_service_port", 80); | 142 | int servicePort = m_config.GetInt("freeswitch_service_port", 80); |
144 | IPAddress serviceIPAddress = IPAddress.Parse(serviceIP); | 143 | IPAddress serviceIPAddress = IPAddress.Parse(serviceIP); |
@@ -156,7 +155,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
156 | // m_freeSwitchSubscribeRetry = m_config.GetInt("freeswitch_subscribe_retry", 120); | 155 | // m_freeSwitchSubscribeRetry = m_config.GetInt("freeswitch_subscribe_retry", 120); |
157 | m_freeSwitchUrlResetPassword = m_config.GetString("freeswitch_password_reset_url", String.Empty); | 156 | m_freeSwitchUrlResetPassword = m_config.GetString("freeswitch_password_reset_url", String.Empty); |
158 | m_freeSwitchContext = m_config.GetString("freeswitch_context", "default"); | 157 | m_freeSwitchContext = m_config.GetString("freeswitch_context", "default"); |
159 | 158 | ||
160 | if (String.IsNullOrEmpty(m_freeSwitchServerUser) || | 159 | if (String.IsNullOrEmpty(m_freeSwitchServerUser) || |
161 | String.IsNullOrEmpty(m_freeSwitchServerPass) || | 160 | String.IsNullOrEmpty(m_freeSwitchServerPass) || |
162 | String.IsNullOrEmpty(m_freeSwitchRealm) || | 161 | String.IsNullOrEmpty(m_freeSwitchRealm) || |
@@ -182,9 +181,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
182 | { | 181 | { |
183 | MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), | 182 | MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), |
184 | FreeSwitchSLVoiceGetPreloginHTTPHandler); | 183 | FreeSwitchSLVoiceGetPreloginHTTPHandler); |
185 | 184 | ||
186 | // RestStreamHandler h = new | 185 | // RestStreamHandler h = new |
187 | // RestStreamHandler("GET", | 186 | // RestStreamHandler("GET", |
188 | // String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceGetPreloginHTTPHandler); | 187 | // String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceGetPreloginHTTPHandler); |
189 | // MainServer.Instance.AddStreamHandler(h); | 188 | // MainServer.Instance.AddStreamHandler(h); |
190 | 189 | ||
@@ -202,13 +201,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
202 | MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix), | 201 | MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix), |
203 | FreeSwitchSLVoiceBuddyHTTPHandler); | 202 | FreeSwitchSLVoiceBuddyHTTPHandler); |
204 | } | 203 | } |
205 | |||
206 | |||
207 | |||
208 | 204 | ||
209 | |||
210 | m_log.InfoFormat("[FreeSwitchVoice] using FreeSwitch server {0}", m_freeSwitchRealm); | 205 | m_log.InfoFormat("[FreeSwitchVoice] using FreeSwitch server {0}", m_freeSwitchRealm); |
211 | 206 | ||
212 | m_FreeSwitchDirectory = new FreeSwitchDirectory(); | 207 | m_FreeSwitchDirectory = new FreeSwitchDirectory(); |
213 | m_FreeSwitchDialplan = new FreeSwitchDialplan(); | 208 | m_FreeSwitchDialplan = new FreeSwitchDialplan(); |
214 | 209 | ||
@@ -225,7 +220,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
225 | } | 220 | } |
226 | } | 221 | } |
227 | 222 | ||
228 | if (m_pluginEnabled) | 223 | if (m_pluginEnabled) |
229 | { | 224 | { |
230 | // we need to capture scene in an anonymous method | 225 | // we need to capture scene in an anonymous method |
231 | // here as we need it later in the callbacks | 226 | // here as we need it later in the callbacks |
@@ -233,8 +228,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
233 | { | 228 | { |
234 | OnRegisterCaps(scene, agentID, caps); | 229 | OnRegisterCaps(scene, agentID, caps); |
235 | }; | 230 | }; |
236 | |||
237 | |||
238 | 231 | ||
239 | try | 232 | try |
240 | { | 233 | { |
@@ -254,16 +247,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
254 | m_log.Error("[FreeSwitchVoice]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions."); | 247 | m_log.Error("[FreeSwitchVoice]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions."); |
255 | } | 248 | } |
256 | } | 249 | } |
257 | |||
258 | } | 250 | } |
259 | } | 251 | } |
260 | 252 | ||
261 | public void PostInitialise() | 253 | public void PostInitialise() |
262 | { | 254 | { |
263 | if (m_pluginEnabled) | 255 | if (m_pluginEnabled) |
264 | { | 256 | { |
265 | m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene"); | 257 | m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene"); |
266 | 258 | ||
267 | // register the voice interface for this module, so the script engine can call us | 259 | // register the voice interface for this module, so the script engine can call us |
268 | m_scene.RegisterModuleInterface<IVoiceModule>(this); | 260 | m_scene.RegisterModuleInterface<IVoiceModule>(this); |
269 | } | 261 | } |
@@ -282,15 +274,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
282 | { | 274 | { |
283 | get { return true; } | 275 | get { return true; } |
284 | } | 276 | } |
285 | 277 | ||
286 | // <summary> | 278 | // <summary> |
287 | // implementation of IVoiceModule, called by osSetParcelSIPAddress script function | 279 | // implementation of IVoiceModule, called by osSetParcelSIPAddress script function |
288 | // </summary> | 280 | // </summary> |
289 | public void setLandSIPAddress(string SIPAddress,UUID GlobalID) | 281 | public void setLandSIPAddress(string SIPAddress,UUID GlobalID) |
290 | { | 282 | { |
291 | m_log.DebugFormat("[FreeSwitchVoice]: setLandSIPAddress parcel id {0}: setting sip address {1}", | 283 | m_log.DebugFormat("[FreeSwitchVoice]: setLandSIPAddress parcel id {0}: setting sip address {1}", |
292 | GlobalID, SIPAddress); | 284 | GlobalID, SIPAddress); |
293 | 285 | ||
294 | lock (m_ParcelAddress) | 286 | lock (m_ParcelAddress) |
295 | { | 287 | { |
296 | if (m_ParcelAddress.ContainsKey(GlobalID.ToString())) | 288 | if (m_ParcelAddress.ContainsKey(GlobalID.ToString())) |
@@ -303,18 +295,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
303 | } | 295 | } |
304 | } | 296 | } |
305 | } | 297 | } |
306 | 298 | ||
307 | // <summary> | 299 | // <summary> |
308 | // OnRegisterCaps is invoked via the scene.EventManager | 300 | // OnRegisterCaps is invoked via the scene.EventManager |
309 | // everytime OpenSim hands out capabilities to a client | 301 | // everytime OpenSim hands out capabilities to a client |
310 | // (login, region crossing). We contribute two capabilities to | 302 | // (login, region crossing). We contribute two capabilities to |
311 | // the set of capabilities handed back to the client: | 303 | // the set of capabilities handed back to the client: |
312 | // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest. | 304 | // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest. |
313 | // | 305 | // |
314 | // ProvisionVoiceAccountRequest allows the client to obtain | 306 | // ProvisionVoiceAccountRequest allows the client to obtain |
315 | // the voice account credentials for the avatar it is | 307 | // the voice account credentials for the avatar it is |
316 | // controlling (e.g., user name, password, etc). | 308 | // controlling (e.g., user name, password, etc). |
317 | // | 309 | // |
318 | // ParcelVoiceInfoRequest is invoked whenever the client | 310 | // ParcelVoiceInfoRequest is invoked whenever the client |
319 | // changes from one region or parcel to another. | 311 | // changes from one region or parcel to another. |
320 | // | 312 | // |
@@ -371,7 +363,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
371 | { | 363 | { |
372 | System.Threading.Thread.Sleep(2000); | 364 | System.Threading.Thread.Sleep(2000); |
373 | avatar = scene.GetScenePresence(agentID); | 365 | avatar = scene.GetScenePresence(agentID); |
374 | 366 | ||
375 | if (avatar == null) | 367 | if (avatar == null) |
376 | return "<llsd>undef</llsd>"; | 368 | return "<llsd>undef</llsd>"; |
377 | } | 369 | } |
@@ -407,8 +399,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
407 | // new LLSDVoiceAccountResponse(agentname, password, m_freeSwitchRealm, "http://etsvc02.hursley.ibm.com/api"); | 399 | // new LLSDVoiceAccountResponse(agentname, password, m_freeSwitchRealm, "http://etsvc02.hursley.ibm.com/api"); |
408 | LLSDVoiceAccountResponse voiceAccountResponse = | 400 | LLSDVoiceAccountResponse voiceAccountResponse = |
409 | new LLSDVoiceAccountResponse(agentname, password, m_freeSwitchRealm, | 401 | new LLSDVoiceAccountResponse(agentname, password, m_freeSwitchRealm, |
410 | String.Format("http://{0}:{1}{2}/", m_openSimWellKnownHTTPAddress, | 402 | String.Format("http://{0}:{1}{2}/", m_openSimWellKnownHTTPAddress, |
411 | m_freeSwitchServicePort, m_freeSwitchAPIPrefix)); | 403 | m_freeSwitchServicePort, m_freeSwitchAPIPrefix)); |
412 | 404 | ||
413 | string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); | 405 | string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); |
414 | 406 | ||
@@ -442,7 +434,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
442 | string avatarName = avatar.Name; | 434 | string avatarName = avatar.Name; |
443 | 435 | ||
444 | // - check whether we have a region channel in our cache | 436 | // - check whether we have a region channel in our cache |
445 | // - if not: | 437 | // - if not: |
446 | // create it and cache it | 438 | // create it and cache it |
447 | // - send it to the client | 439 | // - send it to the client |
448 | // - send channel_uri: as "sip:regionID@m_sipDomain" | 440 | // - send channel_uri: as "sip:regionID@m_sipDomain" |
@@ -451,12 +443,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
451 | LLSDParcelVoiceInfoResponse parcelVoiceInfo; | 443 | LLSDParcelVoiceInfoResponse parcelVoiceInfo; |
452 | string channelUri; | 444 | string channelUri; |
453 | 445 | ||
454 | if (null == scene.LandChannel) | 446 | if (null == scene.LandChannel) |
455 | throw new Exception(String.Format("region \"{0}\": avatar \"{1}\": land data not yet available", | 447 | throw new Exception(String.Format("region \"{0}\": avatar \"{1}\": land data not yet available", |
456 | scene.RegionInfo.RegionName, avatarName)); | 448 | scene.RegionInfo.RegionName, avatarName)); |
457 | 449 | ||
458 | |||
459 | |||
460 | // get channel_uri: check first whether estate | 450 | // get channel_uri: check first whether estate |
461 | // settings allow voice, then whether parcel allows | 451 | // settings allow voice, then whether parcel allows |
462 | // voice, if all do retrieve or obtain the parcel | 452 | // voice, if all do retrieve or obtain the parcel |
@@ -493,22 +483,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
493 | parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); | 483 | parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); |
494 | string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); | 484 | string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); |
495 | 485 | ||
496 | m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", | 486 | m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", |
497 | scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); | 487 | scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); |
498 | return r; | 488 | return r; |
499 | } | 489 | } |
500 | catch (Exception e) | 490 | catch (Exception e) |
501 | { | 491 | { |
502 | m_log.ErrorFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later", | 492 | m_log.ErrorFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later", |
503 | scene.RegionInfo.RegionName, avatarName, e.Message); | 493 | scene.RegionInfo.RegionName, avatarName, e.Message); |
504 | m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed", | 494 | m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed", |
505 | scene.RegionInfo.RegionName, avatarName, e.ToString()); | 495 | scene.RegionInfo.RegionName, avatarName, e.ToString()); |
506 | 496 | ||
507 | return "<llsd>undef</llsd>"; | 497 | return "<llsd>undef</llsd>"; |
508 | } | 498 | } |
509 | } | 499 | } |
510 | 500 | ||
511 | |||
512 | /// <summary> | 501 | /// <summary> |
513 | /// Callback for a client request for ChatSessionRequest | 502 | /// Callback for a client request for ChatSessionRequest |
514 | /// </summary> | 503 | /// </summary> |
@@ -550,7 +539,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
550 | string fwdresponsestr = ""; | 539 | string fwdresponsestr = ""; |
551 | int fwdresponsecode = 200; | 540 | int fwdresponsecode = 200; |
552 | string fwdresponsecontenttype = "text/xml"; | 541 | string fwdresponsecontenttype = "text/xml"; |
553 | |||
554 | 542 | ||
555 | HttpWebRequest forwardreq = (HttpWebRequest)WebRequest.Create(forwardaddress); | 543 | HttpWebRequest forwardreq = (HttpWebRequest)WebRequest.Create(forwardaddress); |
556 | forwardreq.Method = method; | 544 | forwardreq.Method = method; |
@@ -577,7 +565,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
577 | response["content_type"] = fwdresponsecontenttype; | 565 | response["content_type"] = fwdresponsecontenttype; |
578 | response["str_response_string"] = fwdresponsestr; | 566 | response["str_response_string"] = fwdresponsestr; |
579 | response["int_response_code"] = fwdresponsecode; | 567 | response["int_response_code"] = fwdresponsecode; |
580 | 568 | ||
581 | return response; | 569 | return response; |
582 | } | 570 | } |
583 | 571 | ||
@@ -585,11 +573,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
585 | public Hashtable FreeSwitchSLVoiceGetPreloginHTTPHandler(Hashtable request) | 573 | public Hashtable FreeSwitchSLVoiceGetPreloginHTTPHandler(Hashtable request) |
586 | { | 574 | { |
587 | m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler called"); | 575 | m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler called"); |
588 | 576 | ||
589 | Hashtable response = new Hashtable(); | 577 | Hashtable response = new Hashtable(); |
590 | response["content_type"] = "text/xml"; | 578 | response["content_type"] = "text/xml"; |
591 | response["keepalive"] = false; | 579 | response["keepalive"] = false; |
592 | 580 | ||
593 | response["str_response_string"] = String.Format( | 581 | response["str_response_string"] = String.Format( |
594 | "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" + | 582 | "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" + |
595 | "<VCConfiguration>\r\n"+ | 583 | "<VCConfiguration>\r\n"+ |
@@ -607,9 +595,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
607 | "</VCConfiguration>", | 595 | "</VCConfiguration>", |
608 | m_freeSwitchRealm, m_freeSwitchSIPProxy, m_freeSwitchAttemptUseSTUN, | 596 | m_freeSwitchRealm, m_freeSwitchSIPProxy, m_freeSwitchAttemptUseSTUN, |
609 | m_freeSwitchEchoServer, m_freeSwitchEchoPort, | 597 | m_freeSwitchEchoServer, m_freeSwitchEchoPort, |
610 | m_freeSwitchDefaultWellKnownIP, m_freeSwitchDefaultTimeout, | 598 | m_freeSwitchDefaultWellKnownIP, m_freeSwitchDefaultTimeout, |
611 | m_freeSwitchUrlResetPassword, ""); | 599 | m_freeSwitchUrlResetPassword, ""); |
612 | 600 | ||
613 | response["int_response_code"] = 200; | 601 | response["int_response_code"] = 200; |
614 | 602 | ||
615 | m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler return {0}",response["str_response_string"]); | 603 | m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler return {0}",response["str_response_string"]); |
@@ -624,7 +612,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
624 | response["content-type"] = "text/xml"; | 612 | response["content-type"] = "text/xml"; |
625 | 613 | ||
626 | Hashtable requestBody = parseRequestBody((string)request["body"]); | 614 | Hashtable requestBody = parseRequestBody((string)request["body"]); |
627 | 615 | ||
628 | if (!requestBody.ContainsKey("auth_token")) | 616 | if (!requestBody.ContainsKey("auth_token")) |
629 | return response; | 617 | return response; |
630 | 618 | ||
@@ -632,7 +620,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
632 | //string[] auth_tokenvals = auth_token.Split(':'); | 620 | //string[] auth_tokenvals = auth_token.Split(':'); |
633 | //string username = auth_tokenvals[0]; | 621 | //string username = auth_tokenvals[0]; |
634 | int strcount = 0; | 622 | int strcount = 0; |
635 | 623 | ||
636 | string[] ids = new string[strcount]; | 624 | string[] ids = new string[strcount]; |
637 | 625 | ||
638 | int iter = -1; | 626 | int iter = -1; |
@@ -648,7 +636,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
648 | } | 636 | } |
649 | StringBuilder resp = new StringBuilder(); | 637 | StringBuilder resp = new StringBuilder(); |
650 | resp.Append("<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?><response xmlns=\"http://www.vivox.com\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation= \"/xsd/buddy_list.xsd\">"); | 638 | resp.Append("<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?><response xmlns=\"http://www.vivox.com\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation= \"/xsd/buddy_list.xsd\">"); |
651 | 639 | ||
652 | resp.Append(string.Format(@"<level0> | 640 | resp.Append(string.Format(@"<level0> |
653 | <status>OK</status> | 641 | <status>OK</status> |
654 | <cookie_name>lib_session</cookie_name> | 642 | <cookie_name>lib_session</cookie_name> |
@@ -678,7 +666,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
678 | <b2g_group_id></b2g_group_id> | 666 | <b2g_group_id></b2g_group_id> |
679 | </level3>", ids[i],i,m_freeSwitchRealm,dt)); | 667 | </level3>", ids[i],i,m_freeSwitchRealm,dt)); |
680 | } | 668 | } |
681 | 669 | ||
682 | resp.Append("</buddies><groups></groups></body></level0></response>"); | 670 | resp.Append("</buddies><groups></groups></body></level0></response>"); |
683 | 671 | ||
684 | response["str_response_string"] = resp.ToString(); | 672 | response["str_response_string"] = resp.ToString(); |
@@ -694,7 +682,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
694 | string requestbody = (string)request["body"]; | 682 | string requestbody = (string)request["body"]; |
695 | string uri = (string)request["uri"]; | 683 | string uri = (string)request["uri"]; |
696 | string contenttype = (string)request["content-type"]; | 684 | string contenttype = (string)request["content-type"]; |
697 | 685 | ||
698 | Hashtable requestBody = parseRequestBody((string)request["body"]); | 686 | Hashtable requestBody = parseRequestBody((string)request["body"]); |
699 | 687 | ||
700 | //string pwd = (string) requestBody["pwd"]; | 688 | //string pwd = (string) requestBody["pwd"]; |
@@ -712,7 +700,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
712 | pos++; | 700 | pos++; |
713 | if (s == userid) | 701 | if (s == userid) |
714 | break; | 702 | break; |
715 | |||
716 | } | 703 | } |
717 | } | 704 | } |
718 | } | 705 | } |
@@ -735,7 +722,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
735 | </body> | 722 | </body> |
736 | </level0> | 723 | </level0> |
737 | </response>", userid, pos, avatarName); | 724 | </response>", userid, pos, avatarName); |
738 | 725 | ||
739 | response["int_response_code"] = 200; | 726 | response["int_response_code"] = 200; |
740 | return response; | 727 | return response; |
741 | /* | 728 | /* |
@@ -752,13 +739,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
752 | public Hashtable FreeSwitchConfigHTTPHandler(Hashtable request) | 739 | public Hashtable FreeSwitchConfigHTTPHandler(Hashtable request) |
753 | { | 740 | { |
754 | m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler called with {0}", (string)request["body"]); | 741 | m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler called with {0}", (string)request["body"]); |
755 | 742 | ||
756 | Hashtable response = new Hashtable(); | 743 | Hashtable response = new Hashtable(); |
757 | response["str_response_string"] = string.Empty; | 744 | response["str_response_string"] = string.Empty; |
758 | // all the params come as NVPs in the request body | 745 | // all the params come as NVPs in the request body |
759 | Hashtable requestBody = parseRequestBody((string) request["body"]); | 746 | Hashtable requestBody = parseRequestBody((string) request["body"]); |
760 | 747 | ||
761 | // is this a dialplan or directory request | 748 | // is this a dialplan or directory request |
762 | string section = (string) requestBody["section"]; | 749 | string section = (string) requestBody["section"]; |
763 | 750 | ||
764 | if (section == "directory") | 751 | if (section == "directory") |
@@ -767,40 +754,39 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
767 | response = m_FreeSwitchDialplan.HandleDialplanRequest(m_freeSwitchContext, m_freeSwitchRealm, requestBody); | 754 | response = m_FreeSwitchDialplan.HandleDialplanRequest(m_freeSwitchContext, m_freeSwitchRealm, requestBody); |
768 | else | 755 | else |
769 | m_log.WarnFormat("[FreeSwitchVoice]: section was {0}", section); | 756 | m_log.WarnFormat("[FreeSwitchVoice]: section was {0}", section); |
770 | 757 | ||
771 | // XXX: re-generate dialplan: | 758 | // XXX: re-generate dialplan: |
772 | // - conf == region UUID | 759 | // - conf == region UUID |
773 | // - conf number = region port | 760 | // - conf number = region port |
774 | // -> TODO Initialise(): keep track of regions via events | 761 | // -> TODO Initialise(): keep track of regions via events |
775 | // re-generate accounts for all avatars | 762 | // re-generate accounts for all avatars |
776 | // -> TODO Initialise(): keep track of avatars via events | 763 | // -> TODO Initialise(): keep track of avatars via events |
777 | Regex normalizeEndLines = new Regex(@"\r\n", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); | 764 | Regex normalizeEndLines = new Regex(@"\r\n", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); |
778 | 765 | ||
779 | m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler return {0}",normalizeEndLines.Replace(((string)response["str_response_string"]), "")); | 766 | m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler return {0}",normalizeEndLines.Replace(((string)response["str_response_string"]), "")); |
780 | return response; | 767 | return response; |
781 | } | 768 | } |
782 | 769 | ||
783 | public Hashtable parseRequestBody(string body) | 770 | public Hashtable parseRequestBody(string body) |
784 | { | 771 | { |
785 | Hashtable bodyParams = new Hashtable(); | 772 | Hashtable bodyParams = new Hashtable(); |
786 | // split string | 773 | // split string |
787 | string [] nvps = body.Split(new Char [] {'&'}); | 774 | string [] nvps = body.Split(new Char [] {'&'}); |
788 | 775 | ||
789 | foreach (string s in nvps) { | 776 | foreach (string s in nvps) |
790 | 777 | { | |
791 | if (s.Trim() != "") | 778 | if (s.Trim() != "") |
792 | { | 779 | { |
793 | string [] nvp = s.Split(new Char [] {'='}); | 780 | string [] nvp = s.Split(new Char [] {'='}); |
794 | bodyParams.Add(HttpUtility.UrlDecode(nvp[0]), HttpUtility.UrlDecode(nvp[1])); | 781 | bodyParams.Add(HttpUtility.UrlDecode(nvp[0]), HttpUtility.UrlDecode(nvp[1])); |
795 | } | 782 | } |
796 | } | 783 | } |
797 | 784 | ||
798 | return bodyParams; | 785 | return bodyParams; |
799 | } | 786 | } |
800 | 787 | ||
801 | private string ChannelUri(Scene scene, LandData land) | 788 | private string ChannelUri(Scene scene, LandData land) |
802 | { | 789 | { |
803 | |||
804 | string channelUri = null; | 790 | string channelUri = null; |
805 | 791 | ||
806 | string landUUID; | 792 | string landUUID; |
@@ -808,12 +794,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
808 | 794 | ||
809 | // Create parcel voice channel. If no parcel exists, then the voice channel ID is the same | 795 | // Create parcel voice channel. If no parcel exists, then the voice channel ID is the same |
810 | // as the directory ID. Otherwise, it reflects the parcel's ID. | 796 | // as the directory ID. Otherwise, it reflects the parcel's ID. |
811 | 797 | ||
812 | lock (m_ParcelAddress) | 798 | lock (m_ParcelAddress) |
813 | { | 799 | { |
814 | if (m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) | 800 | if (m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) |
815 | { | 801 | { |
816 | m_log.DebugFormat("[FreeSwitchVoice]: parcel id {0}: using sip address {1}", | 802 | m_log.DebugFormat("[FreeSwitchVoice]: parcel id {0}: using sip address {1}", |
817 | land.GlobalID, m_ParcelAddress[land.GlobalID.ToString()]); | 803 | land.GlobalID, m_ParcelAddress[land.GlobalID.ToString()]); |
818 | return m_ParcelAddress[land.GlobalID.ToString()]; | 804 | return m_ParcelAddress[land.GlobalID.ToString()]; |
819 | } | 805 | } |
@@ -823,22 +809,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
823 | { | 809 | { |
824 | landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name); | 810 | landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name); |
825 | landUUID = land.GlobalID.ToString(); | 811 | landUUID = land.GlobalID.ToString(); |
826 | m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", | 812 | m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", |
827 | landName, land.LocalID, landUUID); | 813 | landName, land.LocalID, landUUID); |
828 | } | 814 | } |
829 | else | 815 | else |
830 | { | 816 | { |
831 | landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName); | 817 | landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName); |
832 | landUUID = scene.RegionInfo.RegionID.ToString(); | 818 | landUUID = scene.RegionInfo.RegionID.ToString(); |
833 | m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", | 819 | m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", |
834 | landName, land.LocalID, landUUID); | 820 | landName, land.LocalID, landUUID); |
835 | } | 821 | } |
836 | System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); | 822 | System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); |
837 | 823 | ||
838 | // slvoice handles the sip address differently if it begins with confctl, hiding it from the user in the friends list. however it also disables | 824 | // slvoice handles the sip address differently if it begins with confctl, hiding it from the user in the friends list. however it also disables |
839 | // the personal speech indicators as well unless some siren14-3d codec magic happens. we dont have siren143d so we'll settle for the personal speech indicator. | 825 | // the personal speech indicators as well unless some siren14-3d codec magic happens. we dont have siren143d so we'll settle for the personal speech indicator. |
840 | channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(encoding.GetBytes(landUUID)), m_freeSwitchRealm); | 826 | channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(encoding.GetBytes(landUUID)), m_freeSwitchRealm); |
841 | 827 | ||
842 | lock (m_ParcelAddress) | 828 | lock (m_ParcelAddress) |
843 | { | 829 | { |
844 | if (!m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) | 830 | if (!m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) |
@@ -849,14 +835,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
849 | 835 | ||
850 | return channelUri; | 836 | return channelUri; |
851 | } | 837 | } |
852 | 838 | ||
853 | private static bool CustomCertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) | 839 | private static bool CustomCertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) |
854 | { | 840 | { |
855 | |||
856 | return true; | 841 | return true; |
857 | |||
858 | } | 842 | } |
859 | } | 843 | } |
844 | |||
860 | public class MonoCert : ICertificatePolicy | 845 | public class MonoCert : ICertificatePolicy |
861 | { | 846 | { |
862 | #region ICertificatePolicy Members | 847 | #region ICertificatePolicy Members |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index cb76200..34d0e24 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -39,7 +39,7 @@ using log4net; | |||
39 | using Nini.Config; | 39 | using Nini.Config; |
40 | using Nwc.XmlRpc; | 40 | using Nwc.XmlRpc; |
41 | using OpenSim.Framework; | 41 | using OpenSim.Framework; |
42 | using OpenSim.Framework.Communications.Cache; | 42 | |
43 | using OpenSim.Framework.Capabilities; | 43 | using OpenSim.Framework.Capabilities; |
44 | using OpenSim.Framework.Servers; | 44 | using OpenSim.Framework.Servers; |
45 | using OpenSim.Framework.Servers.HttpServer; | 45 | using OpenSim.Framework.Servers.HttpServer; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 8d32e66..68e6497 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -43,6 +43,8 @@ using OpenSim.Region.CoreModules.Framework.EventQueue; | |||
43 | using OpenSim.Region.Framework.Interfaces; | 43 | using OpenSim.Region.Framework.Interfaces; |
44 | using OpenSim.Region.Framework.Scenes; | 44 | using OpenSim.Region.Framework.Scenes; |
45 | 45 | ||
46 | using OpenSim.Services.Interfaces; | ||
47 | |||
46 | using Caps = OpenSim.Framework.Capabilities.Caps; | 48 | using Caps = OpenSim.Framework.Capabilities.Caps; |
47 | using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags; | 49 | using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags; |
48 | 50 | ||
@@ -507,10 +509,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
507 | { | 509 | { |
508 | if (m_debugEnabled) | 510 | if (m_debugEnabled) |
509 | { | 511 | { |
510 | UserProfileData targetUserProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(member.AgentID); | 512 | UserAccount targetUser = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, member.AgentID); |
511 | if (targetUserProfile != null) | 513 | if (targetUser != null) |
512 | { | 514 | { |
513 | m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUserProfile.Name, member.AcceptNotices); | 515 | m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices); |
514 | } | 516 | } |
515 | else | 517 | else |
516 | { | 518 | { |
@@ -990,9 +992,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
990 | remoteClient.SendEjectGroupMemberReply(remoteClient.AgentId, groupID, true); | 992 | remoteClient.SendEjectGroupMemberReply(remoteClient.AgentId, groupID, true); |
991 | 993 | ||
992 | GroupRecord groupInfo = m_groupData.GetGroupRecord(grID, groupID, null); | 994 | GroupRecord groupInfo = m_groupData.GetGroupRecord(grID, groupID, null); |
993 | UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(ejecteeID); | 995 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, ejecteeID); |
994 | 996 | if ((groupInfo == null) || (account == null)) | |
995 | if ((groupInfo == null) || (userProfile == null)) | ||
996 | { | 997 | { |
997 | return; | 998 | return; |
998 | } | 999 | } |
@@ -1032,9 +1033,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1032 | msg.toAgentID = remoteClient.AgentId.Guid; | 1033 | msg.toAgentID = remoteClient.AgentId.Guid; |
1033 | msg.timestamp = 0; | 1034 | msg.timestamp = 0; |
1034 | msg.fromAgentName = remoteClient.Name; | 1035 | msg.fromAgentName = remoteClient.Name; |
1035 | if (userProfile != null) | 1036 | if (account != null) |
1036 | { | 1037 | { |
1037 | msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, userProfile.Name); | 1038 | msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, account.FirstName + " " + account.LastName); |
1038 | } | 1039 | } |
1039 | else | 1040 | else |
1040 | { | 1041 | { |
@@ -1147,8 +1148,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1147 | info.RequestID.AgentID = client.AgentId; | 1148 | info.RequestID.AgentID = client.AgentId; |
1148 | info.RequestID.SessionID = client.SessionId; | 1149 | info.RequestID.SessionID = client.SessionId; |
1149 | 1150 | ||
1150 | UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(client.AgentId); | 1151 | //UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(client.AgentId); |
1151 | if (userProfile == null) | 1152 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(client.Scene.RegionInfo.ScopeID, client.AgentId); |
1153 | if (account == null) | ||
1152 | { | 1154 | { |
1153 | // This should be impossible. If I've been passed a reference to a client | 1155 | // This should be impossible. If I've been passed a reference to a client |
1154 | // that client should be registered with the UserService. So something | 1156 | // that client should be registered with the UserService. So something |
@@ -1157,19 +1159,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1157 | m_log.WarnFormat("[GROUPS]: Could not find a user profile for {0} / {1}", client.Name, client.AgentId); | 1159 | m_log.WarnFormat("[GROUPS]: Could not find a user profile for {0} / {1}", client.Name, client.AgentId); |
1158 | 1160 | ||
1159 | // Default to local user service and hope for the best? | 1161 | // Default to local user service and hope for the best? |
1160 | info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; | 1162 | // REFACTORING PROBLEM |
1163 | //info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; | ||
1161 | 1164 | ||
1162 | } | 1165 | } |
1163 | else if (userProfile is ForeignUserProfileData) | ||
1164 | { | ||
1165 | // They aren't from around here | ||
1166 | ForeignUserProfileData fupd = (ForeignUserProfileData)userProfile; | ||
1167 | info.RequestID.UserServiceURL = fupd.UserServerURI; | ||
1168 | } | ||
1169 | else | 1166 | else |
1170 | { | 1167 | { |
1168 | string domain = string.Empty; //m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; | ||
1169 | if (account.ServiceURLs["HomeURI"] != null) | ||
1170 | domain = account.ServiceURLs["HomeURI"].ToString(); | ||
1171 | // They're a local user, use this: | 1171 | // They're a local user, use this: |
1172 | info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; | 1172 | info.RequestID.UserServiceURL = domain; |
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | m_clientRequestIDInfo.Add(client.AgentId, info); | 1175 | m_clientRequestIDInfo.Add(client.AgentId, info); |
@@ -1342,12 +1342,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1342 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 1342 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
1343 | 1343 | ||
1344 | // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff | 1344 | // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff |
1345 | UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(dataForAgentID); | 1345 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID); |
1346 | string firstname, lastname; | 1346 | string firstname, lastname; |
1347 | if (userProfile != null) | 1347 | if (account != null) |
1348 | { | 1348 | { |
1349 | firstname = userProfile.FirstName; | 1349 | firstname = account.FirstName; |
1350 | lastname = userProfile.SurName; | 1350 | lastname = account.LastName; |
1351 | } | 1351 | } |
1352 | else | 1352 | else |
1353 | { | 1353 | { |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs index 8ea7ad3..a0dc38b 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
49 | 49 | ||
50 | public UUID SaveBitmap(Bitmap data, bool lossless, bool temporary) | 50 | public UUID SaveBitmap(Bitmap data, bool lossless, bool temporary) |
51 | { | 51 | { |
52 | AssetBase asset = new AssetBase(UUID.Random(), "MRMDynamicImage", (sbyte)AssetType.Texture); | 52 | AssetBase asset = new AssetBase(UUID.Random(), "MRMDynamicImage", (sbyte)AssetType.Texture, m_scene.RegionInfo.RegionID.ToString()); |
53 | asset.Data = OpenJPEG.EncodeFromImage(data, lossless); | 53 | asset.Data = OpenJPEG.EncodeFromImage(data, lossless); |
54 | asset.Description = "MRM Image"; | 54 | asset.Description = "MRM Image"; |
55 | asset.Local = false; | 55 | asset.Local = false; |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatar.cs index 03c1e95..3d49732 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatar.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatar.cs | |||
@@ -34,6 +34,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
34 | { | 34 | { |
35 | public interface IAvatar : IEntity | 35 | public interface IAvatar : IEntity |
36 | { | 36 | { |
37 | |||
38 | bool IsChildAgent { get; } | ||
39 | |||
37 | //// <value> | 40 | //// <value> |
38 | /// Array of worn attachments, empty but not null, if no attachments are worn | 41 | /// Array of worn attachments, empty but not null, if no attachments are worn |
39 | /// </value> | 42 | /// </value> |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index f2adcb7..2ddc31b 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | |||
@@ -212,8 +212,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
212 | if (script.StartsWith("//MRM:C#")) | 212 | if (script.StartsWith("//MRM:C#")) |
213 | { | 213 | { |
214 | if (m_config.GetBoolean("OwnerOnly", true)) | 214 | if (m_config.GetBoolean("OwnerOnly", true)) |
215 | if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.MasterAvatarAssignedUUID | 215 | if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.EstateSettings.EstateOwner |
216 | || m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.MasterAvatarAssignedUUID) | 216 | || m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.EstateSettings.EstateOwner) |
217 | return; | 217 | return; |
218 | 218 | ||
219 | script = ConvertMRMKeywords(script); | 219 | script = ConvertMRMKeywords(script); |
@@ -280,7 +280,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
280 | public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host) | 280 | public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host) |
281 | { | 281 | { |
282 | // UUID should be changed to object owner. | 282 | // UUID should be changed to object owner. |
283 | UUID owner = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 283 | UUID owner = m_scene.RegionInfo.EstateSettings.EstateOwner; |
284 | SEUser securityUser = new SEUser(owner, "Name Unassigned"); | 284 | SEUser securityUser = new SEUser(owner, "Name Unassigned"); |
285 | SecurityCredential creds = new SecurityCredential(securityUser, m_scene); | 285 | SecurityCredential creds = new SecurityCredential(securityUser, m_scene); |
286 | 286 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 31f28e0..5bfe4be 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs | |||
@@ -767,7 +767,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
767 | if (!CanEdit()) | 767 | if (!CanEdit()) |
768 | return; | 768 | return; |
769 | 769 | ||
770 | GetSOP().SendSound(asset.ToString(), volume, true, 0); | 770 | GetSOP().SendSound(asset.ToString(), volume, true, 0, 0, false, false); |
771 | } | 771 | } |
772 | 772 | ||
773 | #endregion | 773 | #endregion |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs index 4427426..0786bd9 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs | |||
@@ -70,6 +70,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
70 | set { GetSP().TeleportWithMomentum(value); } | 70 | set { GetSP().TeleportWithMomentum(value); } |
71 | } | 71 | } |
72 | 72 | ||
73 | public bool IsChildAgent | ||
74 | { | ||
75 | get { return GetSP().IsChildAgent; } | ||
76 | } | ||
77 | |||
73 | #region IAvatar implementation | 78 | #region IAvatar implementation |
74 | public IAvatarAttachment[] Attachments | 79 | public IAvatarAttachment[] Attachments |
75 | { | 80 | { |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs index c7cd37b..45bb005 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs | |||
@@ -231,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
231 | if (soundModule != null) | 231 | if (soundModule != null) |
232 | { | 232 | { |
233 | soundModule.TriggerSound(audio, UUID.Zero, UUID.Zero, UUID.Zero, volume, position, | 233 | soundModule.TriggerSound(audio, UUID.Zero, UUID.Zero, UUID.Zero, volume, position, |
234 | m_internalScene.RegionInfo.RegionHandle); | 234 | m_internalScene.RegionInfo.RegionHandle, 0); |
235 | } | 235 | } |
236 | } | 236 | } |
237 | 237 | ||
@@ -241,7 +241,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
241 | if (soundModule != null) | 241 | if (soundModule != null) |
242 | { | 242 | { |
243 | soundModule.TriggerSound(audio, UUID.Zero, UUID.Zero, UUID.Zero, 1.0, position, | 243 | soundModule.TriggerSound(audio, UUID.Zero, UUID.Zero, UUID.Zero, 1.0, position, |
244 | m_internalScene.RegionInfo.RegionHandle); | 244 | m_internalScene.RegionInfo.RegionHandle, 0); |
245 | } | 245 | } |
246 | } | 246 | } |
247 | 247 | ||
diff --git a/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs index 3490a8b..ccdea14 100644 --- a/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs | |||
@@ -121,19 +121,19 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
121 | { | 121 | { |
122 | serialiser.LoadPrimsFromXml2( | 122 | serialiser.LoadPrimsFromXml2( |
123 | scene, | 123 | scene, |
124 | m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID | 124 | m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID |
125 | + Slash.DirectorySeparatorChar + "objects.xml"); | 125 | + Slash.DirectorySeparatorChar + "objects.xml"); |
126 | 126 | ||
127 | scene.RequestModuleInterface<ITerrainModule>().LoadFromFile( | 127 | scene.RequestModuleInterface<ITerrainModule>().LoadFromFile( |
128 | m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID | 128 | m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID |
129 | + Slash.DirectorySeparatorChar + "heightmap.r32"); | 129 | + Slash.DirectorySeparatorChar + "heightmap.r32"); |
130 | 130 | ||
131 | m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ")."); | 131 | m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ")."); |
132 | } | 132 | } |
133 | else | 133 | else |
134 | { | 134 | { |
135 | m_log.ErrorFormat( | 135 | m_log.ErrorFormat( |
136 | "[SVNBACKUP]: Region load of {0} failed - no serialisation module available", | 136 | "[SVNBACKUP]: Region load of {0} failed - no serialisation module available", |
137 | scene.RegionInfo.RegionName); | 137 | scene.RegionInfo.RegionName); |
138 | } | 138 | } |
139 | } | 139 | } |
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 3160cd3..b9a75cc 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -36,10 +36,11 @@ using Nwc.XmlRpc; | |||
36 | using Mono.Addins; | 36 | using Mono.Addins; |
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Communications.Cache; | 39 | |
40 | using OpenSim.Framework.Servers.HttpServer; | 40 | using OpenSim.Framework.Servers.HttpServer; |
41 | using OpenSim.Region.Framework.Interfaces; | 41 | using OpenSim.Region.Framework.Interfaces; |
42 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
43 | using OpenSim.Services.Interfaces; | ||
43 | 44 | ||
44 | namespace OpenSim.Region.OptionalModules.World.MoneyModule | 45 | namespace OpenSim.Region.OptionalModules.World.MoneyModule |
45 | { | 46 | { |
@@ -65,7 +66,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
65 | // private UUID EconomyBaseAccount = UUID.Zero; | 66 | // private UUID EconomyBaseAccount = UUID.Zero; |
66 | 67 | ||
67 | private float EnergyEfficiency = 0f; | 68 | private float EnergyEfficiency = 0f; |
68 | private bool gridmode = false; | ||
69 | // private ObjectPaid handerOnObjectPaid; | 69 | // private ObjectPaid handerOnObjectPaid; |
70 | private bool m_enabled = true; | 70 | private bool m_enabled = true; |
71 | private bool m_sellEnabled = false; | 71 | private bool m_sellEnabled = false; |
@@ -242,7 +242,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
242 | { | 242 | { |
243 | if (config == "Startup" && startupConfig != null) | 243 | if (config == "Startup" && startupConfig != null) |
244 | { | 244 | { |
245 | gridmode = startupConfig.GetBoolean("gridmode", false); | ||
246 | m_enabled = (startupConfig.GetString("economymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule"); | 245 | m_enabled = (startupConfig.GetString("economymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule"); |
247 | } | 246 | } |
248 | 247 | ||
@@ -292,18 +291,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
292 | 291 | ||
293 | private void GetClientFunds(IClientAPI client) | 292 | private void GetClientFunds(IClientAPI client) |
294 | { | 293 | { |
295 | // Here we check if we're in grid mode | 294 | CheckExistAndRefreshFunds(client.AgentId); |
296 | // I imagine that the 'check balance' | ||
297 | // function for the client should be here or shortly after | ||
298 | |||
299 | if (gridmode) | ||
300 | { | ||
301 | CheckExistAndRefreshFunds(client.AgentId); | ||
302 | } | ||
303 | else | ||
304 | { | ||
305 | CheckExistAndRefreshFunds(client.AgentId); | ||
306 | } | ||
307 | 295 | ||
308 | } | 296 | } |
309 | 297 | ||
@@ -398,10 +386,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
398 | { | 386 | { |
399 | // try avatar username surname | 387 | // try avatar username surname |
400 | Scene scene = GetRandomScene(); | 388 | Scene scene = GetRandomScene(); |
401 | CachedUserInfo profile = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentID); | 389 | UserAccount account = scene.UserAccountService.GetUserAccount(scene.RegionInfo.ScopeID, agentID); |
402 | if (profile != null && profile.UserProfile != null) | 390 | if (account != null) |
403 | { | 391 | { |
404 | string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; | 392 | string avatarname = account.FirstName + " " + account.LastName; |
405 | return avatarname; | 393 | return avatarname; |
406 | } | 394 | } |
407 | else | 395 | else |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 3135cdc..15473d8 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -189,7 +189,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
189 | public event DeRezObject OnDeRezObject; | 189 | public event DeRezObject OnDeRezObject; |
190 | public event Action<IClientAPI> OnRegionHandShakeReply; | 190 | public event Action<IClientAPI> OnRegionHandShakeReply; |
191 | public event GenericCall2 OnRequestWearables; | 191 | public event GenericCall2 OnRequestWearables; |
192 | public event GenericCall2 OnCompleteMovementToRegion; | 192 | public event GenericCall1 OnCompleteMovementToRegion; |
193 | public event UpdateAgent OnAgentUpdate; | 193 | public event UpdateAgent OnAgentUpdate; |
194 | public event AgentRequestSit OnAgentRequestSit; | 194 | public event AgentRequestSit OnAgentRequestSit; |
195 | public event AgentSit OnAgentSit; | 195 | public event AgentSit OnAgentSit; |
@@ -298,6 +298,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
298 | public event ObjectBuy OnObjectBuy; | 298 | public event ObjectBuy OnObjectBuy; |
299 | public event BuyObjectInventory OnBuyObjectInventory; | 299 | public event BuyObjectInventory OnBuyObjectInventory; |
300 | public event AgentSit OnUndo; | 300 | public event AgentSit OnUndo; |
301 | public event AgentSit OnRedo; | ||
302 | public event LandUndo OnLandUndo; | ||
301 | 303 | ||
302 | public event ForceReleaseControls OnForceReleaseControls; | 304 | public event ForceReleaseControls OnForceReleaseControls; |
303 | public event GodLandStatRequest OnLandStatRequest; | 305 | public event GodLandStatRequest OnLandStatRequest; |
@@ -455,6 +457,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
455 | set { } | 457 | set { } |
456 | } | 458 | } |
457 | 459 | ||
460 | public bool IsLoggingOut | ||
461 | { | ||
462 | get { return false; } | ||
463 | set { } | ||
464 | } | ||
458 | public UUID ActiveGroupId | 465 | public UUID ActiveGroupId |
459 | { | 466 | { |
460 | get { return UUID.Zero; } | 467 | get { return UUID.Zero; } |
@@ -737,7 +744,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
737 | 744 | ||
738 | if (OnCompleteMovementToRegion != null) | 745 | if (OnCompleteMovementToRegion != null) |
739 | { | 746 | { |
740 | OnCompleteMovementToRegion(); | 747 | OnCompleteMovementToRegion(this); |
741 | } | 748 | } |
742 | } | 749 | } |
743 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) | 750 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) |
@@ -1148,5 +1155,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1148 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | 1155 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) |
1149 | { | 1156 | { |
1150 | } | 1157 | } |
1158 | |||
1159 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | ||
1160 | { | ||
1161 | } | ||
1151 | } | 1162 | } |
1152 | } | 1163 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index ac39a53..6e742f1 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -34,6 +34,7 @@ using OpenSim.Region.Framework.Scenes; | |||
34 | using OpenSim.Region.CoreModules.Avatar.NPC; | 34 | using OpenSim.Region.CoreModules.Avatar.NPC; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using Timer=System.Timers.Timer; | 36 | using Timer=System.Timers.Timer; |
37 | using OpenSim.Services.Interfaces; | ||
37 | 38 | ||
38 | namespace OpenSim.Region.OptionalModules.World.NPC | 39 | namespace OpenSim.Region.OptionalModules.World.NPC |
39 | { | 40 | { |
@@ -63,11 +64,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
63 | if (m_appearanceCache.ContainsKey(target)) | 64 | if (m_appearanceCache.ContainsKey(target)) |
64 | return m_appearanceCache[target]; | 65 | return m_appearanceCache[target]; |
65 | 66 | ||
66 | AvatarAppearance x = scene.CommsManager.AvatarService.GetUserAppearance(target); | 67 | AvatarData adata = scene.AvatarService.GetAvatar(target); |
68 | if (adata != null) | ||
69 | { | ||
70 | AvatarAppearance x = adata.ToAvatarAppearance(target); | ||
67 | 71 | ||
68 | m_appearanceCache.Add(target, x); | 72 | m_appearanceCache.Add(target, x); |
69 | 73 | ||
70 | return x; | 74 | return x; |
75 | } | ||
76 | return new AvatarAppearance(); | ||
71 | } | 77 | } |
72 | 78 | ||
73 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) | 79 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) |
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index c8e6e4b..3ed338b 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | |||
@@ -306,8 +306,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
306 | 306 | ||
307 | m_log.InfoFormat("[TREES]: New tree planting for copse {0}", copsename); | 307 | m_log.InfoFormat("[TREES]: New tree planting for copse {0}", copsename); |
308 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; | 308 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; |
309 | if (uuid == UUID.Zero) | ||
310 | uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
311 | 309 | ||
312 | foreach (Copse copse in m_copse) | 310 | foreach (Copse copse in m_copse) |
313 | { | 311 | { |
@@ -760,8 +758,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
760 | Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) | 758 | Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) |
761 | { | 759 | { |
762 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; | 760 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; |
763 | if (uuid == UUID.Zero) | ||
764 | uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
765 | 761 | ||
766 | CreateTree(uuid, copse, position); | 762 | CreateTree(uuid, copse, position); |
767 | } | 763 | } |