From b63405c1a796b44b58081857d01f726372467628 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 8 Jan 2010 10:43:34 -0800 Subject: Inching ahead... This compiles, but very likely does not run. --- .../Avatar/XmlRpcGroups/GroupsModule.cs | 41 +++++++++++----------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 8d32e66..c8a10b5 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; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using OpenSim.Services.Interfaces; + using Caps = OpenSim.Framework.Capabilities.Caps; using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags; @@ -507,10 +509,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { if (m_debugEnabled) { - UserProfileData targetUserProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(member.AgentID); - if (targetUserProfile != null) + UserAccount targetUser = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, member.AgentID); + if (targetUser != null) { - m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUserProfile.Name, member.AcceptNotices); + m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices); } else { @@ -990,9 +992,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups remoteClient.SendEjectGroupMemberReply(remoteClient.AgentId, groupID, true); GroupRecord groupInfo = m_groupData.GetGroupRecord(grID, groupID, null); - UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(ejecteeID); - - if ((groupInfo == null) || (userProfile == null)) + UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, ejecteeID); + if ((groupInfo == null) || (account == null)) { return; } @@ -1032,9 +1033,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups msg.toAgentID = remoteClient.AgentId.Guid; msg.timestamp = 0; msg.fromAgentName = remoteClient.Name; - if (userProfile != null) + if (account != null) { - msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, userProfile.Name); + msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, account.FirstName + " " + account.LastName); } else { @@ -1147,8 +1148,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups info.RequestID.AgentID = client.AgentId; info.RequestID.SessionID = client.SessionId; - UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(client.AgentId); - if (userProfile == null) + //UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(client.AgentId); + UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(client.Scene.RegionInfo.ScopeID, client.AgentId); + if (account == null) { // This should be impossible. If I've been passed a reference to a client // that client should be registered with the UserService. So something @@ -1160,16 +1162,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; } - else if (userProfile is ForeignUserProfileData) - { - // They aren't from around here - ForeignUserProfileData fupd = (ForeignUserProfileData)userProfile; - info.RequestID.UserServiceURL = fupd.UserServerURI; - } else { + string domain = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; + if (account.ServiceURLs["HomeURI"] != null) + domain = account.ServiceURLs["HomeURI"].ToString(); // They're a local user, use this: - info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; + info.RequestID.UserServiceURL = domain; } m_clientRequestIDInfo.Add(client.AgentId, info); @@ -1342,12 +1341,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff - UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(dataForAgentID); + UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID); string firstname, lastname; - if (userProfile != null) + if (account != null) { - firstname = userProfile.FirstName; - lastname = userProfile.SurName; + firstname = account.FirstName; + lastname = account.LastName; } else { -- cgit v1.1 From 1e1b2ab221851efc414678b7ea52ef2ca788ce9f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 10:40:07 -0800 Subject: * OMG! All but one references to UserProfileCacheService have been rerouted! * HG is seriously broken here * Compiles. Untested. --- .../Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 3160cd3..648a5a4 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs @@ -40,6 +40,7 @@ using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using OpenSim.Services.Interfaces; namespace OpenSim.Region.OptionalModules.World.MoneyModule { @@ -398,10 +399,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule { // try avatar username surname Scene scene = GetRandomScene(); - CachedUserInfo profile = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentID); - if (profile != null && profile.UserProfile != null) + UserAccount account = scene.UserAccountService.GetUserAccount(scene.RegionInfo.ScopeID, agentID); + if (account != null) { - string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; + string avatarname = account.FirstName + " " + account.LastName; return avatarname; } else -- cgit v1.1 From 3c90d834eac382af5edf091e83aea1ffcce91792 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 10 Jan 2010 22:41:42 +0000 Subject: Remove all references to master avatar, replacing with estate owner where appropriate. This changes the behavior of the REST plugins and RemoteAdmin's region creation process. --- OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs | 4 ---- OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | 6 +++--- .../OptionalModules/World/TreePopulator/TreePopulatorModule.cs | 4 ---- 3 files changed, 3 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/OptionalModules') 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 internal string Host = String.Empty; internal string LocX = String.Empty; internal string LocY = String.Empty; - internal string MA1 = String.Empty; - internal string MA2 = String.Empty; internal string IDK = String.Empty; // System values - used only be the IRC classes themselves @@ -85,8 +83,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat Host = scene.RegionInfo.ExternalHostName; LocX = Convert.ToString(scene.RegionInfo.RegionLocX); LocY = Convert.ToString(scene.RegionInfo.RegionLocY); - MA1 = scene.RegionInfo.MasterAvatarFirstName; - MA2 = scene.RegionInfo.MasterAvatarLastName; IDK = Convert.ToString(_idk_++); // OpenChannel conditionally establishes a connection to the diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index 4521f8e..19f9a82 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 if (script.StartsWith("//MRM:C#")) { if (m_config.GetBoolean("OwnerOnly", true)) - if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.MasterAvatarAssignedUUID - || m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.MasterAvatarAssignedUUID) + if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.EstateSettings.EstateOwner) + || m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.EstateSettings.EstateOwner) return; script = ConvertMRMKeywords(script); @@ -280,7 +280,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host) { // UUID should be changed to object owner. - UUID owner = m_scene.RegionInfo.MasterAvatarAssignedUUID; + UUID owner = m_scene.RegionInfo.EstateSettings.EstateOwner) SEUser securityUser = new SEUser(owner, "Name Unassigned"); SecurityCredential creds = new SecurityCredential(securityUser, m_scene); diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index e3fbb6e..92a205b 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 m_log.InfoFormat("[TREES]: New tree planting for copse {0}", copsename); UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; - if (uuid == UUID.Zero) - uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; foreach (Copse copse in m_copse) { @@ -760,8 +758,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) { UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; - if (uuid == UUID.Zero) - uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; CreateTree(uuid, copse, position); } -- cgit v1.1 From b5f1857d34a38e4217ec68e413ba9473f1af517a Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 10 Jan 2010 22:55:43 +0000 Subject: Remove a little bit more if master avatar --- OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs index 3c5e8c9..e11cbd7 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs @@ -477,12 +477,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat case "%host" : result = result.Replace(vvar, rs.Host); break; - case "%master1" : - result = result.Replace(vvar, rs.MA1); - break; - case "%master2" : - result = result.Replace(vvar, rs.MA2); - break; case "%locx" : result = result.Replace(vvar, rs.LocX); break; -- cgit v1.1 From e31131b40fbadbba6e28d2386168ecaf2f9f743a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 15:41:49 -0800 Subject: Some typos fixed related to master avie removal --- OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index 19f9a82..b4866b2 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs @@ -212,7 +212,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule if (script.StartsWith("//MRM:C#")) { if (m_config.GetBoolean("OwnerOnly", true)) - if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.EstateSettings.EstateOwner) + if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.EstateSettings.EstateOwner || m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.EstateSettings.EstateOwner) return; @@ -280,7 +280,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host) { // UUID should be changed to object owner. - UUID owner = m_scene.RegionInfo.EstateSettings.EstateOwner) + UUID owner = m_scene.RegionInfo.EstateSettings.EstateOwner; SEUser securityUser = new SEUser(owner, "Name Unassigned"); SecurityCredential creds = new SecurityCredential(securityUser, m_scene); -- cgit v1.1 From 0c2946031bccf75c28968b6adcde5cce5bc45c13 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 19:42:36 -0800 Subject: CommunicationsManager is practically empty. Only NetworkServersInfo is there. --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index ac39a53..a6d4a93 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; using OpenSim.Region.CoreModules.Avatar.NPC; using OpenSim.Framework; using Timer=System.Timers.Timer; +using OpenSim.Services.Interfaces; namespace OpenSim.Region.OptionalModules.World.NPC { @@ -63,11 +64,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC if (m_appearanceCache.ContainsKey(target)) return m_appearanceCache[target]; - AvatarAppearance x = scene.CommsManager.AvatarService.GetUserAppearance(target); + AvatarData adata = scene.AvatarService.GetAvatar(target); + if (adata != null) + { + AvatarAppearance x = adata.ToAvatarAppearance(); - m_appearanceCache.Add(target, x); + m_appearanceCache.Add(target, x); - return x; + return x; + } + return new AvatarAppearance(); } public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) -- cgit v1.1 From 751e70af788bf27fa0401c25d899f73186c8eafa Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 21:37:36 -0800 Subject: NetworkServersInfo removed from CommsManager. --- OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index c8a10b5..68e6497 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -1159,12 +1159,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups m_log.WarnFormat("[GROUPS]: Could not find a user profile for {0} / {1}", client.Name, client.AgentId); // Default to local user service and hope for the best? - info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; + // REFACTORING PROBLEM + //info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; } else { - string domain = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; + string domain = string.Empty; //m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; if (account.ServiceURLs["HomeURI"] != null) domain = account.ServiceURLs["HomeURI"].ToString(); // They're a local user, use this: -- cgit v1.1 From c5ea783526611a968400a1936e4c6764ee1c7013 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 11 Jan 2010 07:51:33 -0800 Subject: OpenSim/Framework/Communications/Cache deleted. LibraryRootFolder deleted. --- .../Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 2 +- .../Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 2 +- OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index b04b076..51341de 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; using Nini.Config; using Nwc.XmlRpc; using OpenSim.Framework; -using OpenSim.Framework.Communications.Cache; + using OpenSim.Framework.Capabilities; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; 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; using Nini.Config; using Nwc.XmlRpc; using OpenSim.Framework; -using OpenSim.Framework.Communications.Cache; + using OpenSim.Framework.Capabilities; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 648a5a4..be2734d 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs @@ -36,7 +36,7 @@ using Nwc.XmlRpc; using Mono.Addins; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications.Cache; + using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -- cgit v1.1 From 77e43f480154b0a950d9d5f54df5c225fc64e77a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 11 Jan 2010 17:30:05 -0800 Subject: Fixed a couple of bugs with Appearance. Appearance is all good now. --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index a6d4a93..6e742f1 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -67,7 +67,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC AvatarData adata = scene.AvatarService.GetAvatar(target); if (adata != null) { - AvatarAppearance x = adata.ToAvatarAppearance(); + AvatarAppearance x = adata.ToAvatarAppearance(target); m_appearanceCache.Add(target, x); -- cgit v1.1 From 5001f61c08fea2ebfcb2590be69073d04d129d70 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 29 Jan 2010 18:59:41 -0800 Subject: * HGGridConnector is no longer necessary. * Handle logout properly. This needed an addition to IClientAPI, because of how the logout packet is currently being handled -- the agent is being removed from the scene before the different event handlers are executed, which is broken. --- .../Server/IRCClientView.cs | 24 ++++++++++++++-------- .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 23 +++++++++++++-------- 2 files changed, 29 insertions(+), 18 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 6785c08..a781a1d 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 set { if (!value) Disconnect("IsActive Disconnected?"); } } + public bool IsLoggingOut + { + get { return false; } + set { } + } + public bool SendLogoutPacketWhenClosing { set { } @@ -1657,15 +1663,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) - { - } - - public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) - { - } - - public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) - { + { + } + + public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) + { + } + + public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) + { } } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 4a4c515..57ab6ad 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -455,6 +455,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC set { } } + public bool IsLoggingOut + { + get { return false; } + set { } + } public UUID ActiveGroupId { get { return UUID.Zero; } @@ -1138,15 +1143,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC } public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) - { - } - - public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) - { - } - - public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) - { + { + } + + public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) + { + } + + public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) + { } } } -- cgit v1.1 From 041594ed075049f804fc157700a6d78e54194c0b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 31 Jan 2010 13:01:23 -0800 Subject: Cleaned up configuration. 'gridmode' and 'hypergrid' are gone, as well as lots of other obsolete configs. --- .../World/MoneyModule/SampleMoneyModule.cs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index be2734d..b9a75cc 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs @@ -66,7 +66,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule // private UUID EconomyBaseAccount = UUID.Zero; private float EnergyEfficiency = 0f; - private bool gridmode = false; // private ObjectPaid handerOnObjectPaid; private bool m_enabled = true; private bool m_sellEnabled = false; @@ -243,7 +242,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule { if (config == "Startup" && startupConfig != null) { - gridmode = startupConfig.GetBoolean("gridmode", false); m_enabled = (startupConfig.GetString("economymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule"); } @@ -293,18 +291,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule private void GetClientFunds(IClientAPI client) { - // Here we check if we're in grid mode - // I imagine that the 'check balance' - // function for the client should be here or shortly after - - if (gridmode) - { - CheckExistAndRefreshFunds(client.AgentId); - } - else - { - CheckExistAndRefreshFunds(client.AgentId); - } + CheckExistAndRefreshFunds(client.AgentId); } -- cgit v1.1 From 9821c4f566e11c75c8d87721777480c5b2e2bd4e Mon Sep 17 00:00:00 2001 From: Revolution Date: Sun, 14 Feb 2010 15:41:57 -0600 Subject: Revolution is on the roll again! :) Fixes: Undo, T-pose of others on login, modifiedBulletX works again, feet now stand on the ground instead of in the ground, adds checks to CombatModule. Adds: Redo, Land Undo, checks to agentUpdate (so one can not fall off of a region), more vehicle parts. Finishes almost all of LSL (1 function left, 2 events). Direct flames and kudos to Revolution, please Signed-off-by: Melanie --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 ++ OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs | 2 +- OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs | 4 ++-- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index b421623..009dd37 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -774,6 +774,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event UUIDNameRequest OnTeleportHomeRequest; public event ScriptAnswer OnScriptAnswer; public event AgentSit OnUndo; + public event AgentSit OnRedo; + public event LandUndo OnLandUndo; public event ForceReleaseControls OnForceReleaseControls; public event GodLandStatRequest OnLandStatRequest; public event DetailedEstateDataRequest OnDetailedEstateDataRequest; 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 if (!CanEdit()) return; - GetSOP().SendSound(asset.ToString(), volume, true, 0); + GetSOP().SendSound(asset.ToString(), volume, true, 0, 0, false, false); } #endregion 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 if (soundModule != null) { soundModule.TriggerSound(audio, UUID.Zero, UUID.Zero, UUID.Zero, volume, position, - m_internalScene.RegionInfo.RegionHandle); + m_internalScene.RegionInfo.RegionHandle, 0); } } @@ -241,7 +241,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule if (soundModule != null) { soundModule.TriggerSound(audio, UUID.Zero, UUID.Zero, UUID.Zero, 1.0, position, - m_internalScene.RegionInfo.RegionHandle); + m_internalScene.RegionInfo.RegionHandle, 0); } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 1d15552..b331001 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -298,6 +298,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event ObjectBuy OnObjectBuy; public event BuyObjectInventory OnBuyObjectInventory; public event AgentSit OnUndo; + public event AgentSit OnRedo; + public event LandUndo OnLandUndo; public event ForceReleaseControls OnForceReleaseControls; public event GodLandStatRequest OnLandStatRequest; -- cgit v1.1 From 68b494b2cc54cfdd8fa8a0736332046de3887d6f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 19 Feb 2010 22:44:33 +0000 Subject: Apply http://opensimulator.org/mantis/view.php?id=4495 Adds IsChildAgent property to IAvatar in MRM. Thanks ziah --- .../OptionalModules/Scripting/Minimodule/Interfaces/IAvatar.cs | 3 +++ OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs | 5 +++++ 2 files changed, 8 insertions(+) (limited to 'OpenSim/Region/OptionalModules') 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 { public interface IAvatar : IEntity { + + bool IsChildAgent { get; } + //// /// Array of worn attachments, empty but not null, if no attachments are worn /// 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 set { GetSP().TeleportWithMomentum(value); } } + public bool IsChildAgent + { + get { return GetSP().IsChildAgent; } + } + #region IAvatar implementation public IAvatarAttachment[] Attachments { -- cgit v1.1 From d1f2fae3481ea502630eaf2c4d1cdb776b165c05 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sat, 20 Feb 2010 11:01:50 +0900 Subject: Formatting cleanup. --- .../Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 123 +++++++++------------ .../SvnSerialiser/SvnBackupModule.cs | 10 +- 2 files changed, 59 insertions(+), 74 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index b04b076..35819a6 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -50,7 +50,6 @@ using OpenSim.Region.Framework.Scenes; using Caps = OpenSim.Framework.Capabilities.Caps; using System.Text.RegularExpressions; - namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice { public class FreeSwitchVoiceModule : IRegionModule, IVoiceModule @@ -76,7 +75,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice // SLVoice client will do a GET on this prefix private static string m_freeSwitchAPIPrefix; - // We need to return some information to SLVoice + // We need to return some information to SLVoice // figured those out via curl // http://vd1.vivox.com/api2/viv_get_prelogin.php // @@ -102,9 +101,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice private readonly Dictionary m_UUIDName = new Dictionary(); private Dictionary m_ParcelAddress = new Dictionary(); - + private Scene m_scene; - + private IConfig m_config; @@ -136,9 +135,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice m_freeSwitchServerUser = m_config.GetString("freeswitch_server_user", String.Empty); m_freeSwitchServerPass = m_config.GetString("freeswitch_server_pass", String.Empty); m_freeSwitchAPIPrefix = m_config.GetString("freeswitch_api_prefix", String.Empty); - + // 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) - + string serviceIP = m_config.GetString("freeswitch_service_server", String.Empty); int servicePort = m_config.GetInt("freeswitch_service_port", 80); IPAddress serviceIPAddress = IPAddress.Parse(serviceIP); @@ -156,7 +155,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice // m_freeSwitchSubscribeRetry = m_config.GetInt("freeswitch_subscribe_retry", 120); m_freeSwitchUrlResetPassword = m_config.GetString("freeswitch_password_reset_url", String.Empty); m_freeSwitchContext = m_config.GetString("freeswitch_context", "default"); - + if (String.IsNullOrEmpty(m_freeSwitchServerUser) || String.IsNullOrEmpty(m_freeSwitchServerPass) || String.IsNullOrEmpty(m_freeSwitchRealm) || @@ -182,9 +181,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice { MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceGetPreloginHTTPHandler); - + // RestStreamHandler h = new - // RestStreamHandler("GET", + // RestStreamHandler("GET", // String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceGetPreloginHTTPHandler); // MainServer.Instance.AddStreamHandler(h); @@ -202,13 +201,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceBuddyHTTPHandler); } - - - - m_log.InfoFormat("[FreeSwitchVoice] using FreeSwitch server {0}", m_freeSwitchRealm); - + m_FreeSwitchDirectory = new FreeSwitchDirectory(); m_FreeSwitchDialplan = new FreeSwitchDialplan(); @@ -225,7 +220,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice } } - if (m_pluginEnabled) + if (m_pluginEnabled) { // we need to capture scene in an anonymous method // here as we need it later in the callbacks @@ -233,8 +228,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice { OnRegisterCaps(scene, agentID, caps); }; - - try { @@ -254,16 +247,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice 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."); } } - } } - + public void PostInitialise() { if (m_pluginEnabled) { m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene"); - + // register the voice interface for this module, so the script engine can call us m_scene.RegisterModuleInterface(this); } @@ -282,15 +274,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice { get { return true; } } - + // // implementation of IVoiceModule, called by osSetParcelSIPAddress script function // public void setLandSIPAddress(string SIPAddress,UUID GlobalID) { - m_log.DebugFormat("[FreeSwitchVoice]: setLandSIPAddress parcel id {0}: setting sip address {1}", + m_log.DebugFormat("[FreeSwitchVoice]: setLandSIPAddress parcel id {0}: setting sip address {1}", GlobalID, SIPAddress); - + lock (m_ParcelAddress) { if (m_ParcelAddress.ContainsKey(GlobalID.ToString())) @@ -303,18 +295,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice } } } - + // // OnRegisterCaps is invoked via the scene.EventManager // everytime OpenSim hands out capabilities to a client // (login, region crossing). We contribute two capabilities to // the set of capabilities handed back to the client: // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest. - // + // // ProvisionVoiceAccountRequest allows the client to obtain // the voice account credentials for the avatar it is // controlling (e.g., user name, password, etc). - // + // // ParcelVoiceInfoRequest is invoked whenever the client // changes from one region or parcel to another. // @@ -371,7 +363,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice { System.Threading.Thread.Sleep(2000); avatar = scene.GetScenePresence(agentID); - + if (avatar == null) return "undef"; } @@ -407,8 +399,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice // new LLSDVoiceAccountResponse(agentname, password, m_freeSwitchRealm, "http://etsvc02.hursley.ibm.com/api"); LLSDVoiceAccountResponse voiceAccountResponse = new LLSDVoiceAccountResponse(agentname, password, m_freeSwitchRealm, - String.Format("http://{0}:{1}{2}/", m_openSimWellKnownHTTPAddress, - m_freeSwitchServicePort, m_freeSwitchAPIPrefix)); + String.Format("http://{0}:{1}{2}/", m_openSimWellKnownHTTPAddress, + m_freeSwitchServicePort, m_freeSwitchAPIPrefix)); string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); @@ -442,7 +434,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice string avatarName = avatar.Name; // - check whether we have a region channel in our cache - // - if not: + // - if not: // create it and cache it // - send it to the client // - send channel_uri: as "sip:regionID@m_sipDomain" @@ -451,12 +443,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice LLSDParcelVoiceInfoResponse parcelVoiceInfo; string channelUri; - if (null == scene.LandChannel) + if (null == scene.LandChannel) throw new Exception(String.Format("region \"{0}\": avatar \"{1}\": land data not yet available", scene.RegionInfo.RegionName, avatarName)); - - // get channel_uri: check first whether estate // settings allow voice, then whether parcel allows // voice, if all do retrieve or obtain the parcel @@ -493,22 +483,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); - m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", + m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); return r; } catch (Exception e) { - m_log.ErrorFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later", + m_log.ErrorFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later", scene.RegionInfo.RegionName, avatarName, e.Message); - m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed", + m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed", scene.RegionInfo.RegionName, avatarName, e.ToString()); return "undef"; } } - /// /// Callback for a client request for ChatSessionRequest /// @@ -550,7 +539,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice string fwdresponsestr = ""; int fwdresponsecode = 200; string fwdresponsecontenttype = "text/xml"; - HttpWebRequest forwardreq = (HttpWebRequest)WebRequest.Create(forwardaddress); forwardreq.Method = method; @@ -577,7 +565,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice response["content_type"] = fwdresponsecontenttype; response["str_response_string"] = fwdresponsestr; response["int_response_code"] = fwdresponsecode; - + return response; } @@ -585,11 +573,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice public Hashtable FreeSwitchSLVoiceGetPreloginHTTPHandler(Hashtable request) { m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler called"); - + Hashtable response = new Hashtable(); response["content_type"] = "text/xml"; response["keepalive"] = false; - + response["str_response_string"] = String.Format( "\r\n" + "\r\n"+ @@ -607,9 +595,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice "", m_freeSwitchRealm, m_freeSwitchSIPProxy, m_freeSwitchAttemptUseSTUN, m_freeSwitchEchoServer, m_freeSwitchEchoPort, - m_freeSwitchDefaultWellKnownIP, m_freeSwitchDefaultTimeout, + m_freeSwitchDefaultWellKnownIP, m_freeSwitchDefaultTimeout, m_freeSwitchUrlResetPassword, ""); - + response["int_response_code"] = 200; m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler return {0}",response["str_response_string"]); @@ -624,7 +612,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice response["content-type"] = "text/xml"; Hashtable requestBody = parseRequestBody((string)request["body"]); - + if (!requestBody.ContainsKey("auth_token")) return response; @@ -632,7 +620,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice //string[] auth_tokenvals = auth_token.Split(':'); //string username = auth_tokenvals[0]; int strcount = 0; - + string[] ids = new string[strcount]; int iter = -1; @@ -648,7 +636,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice } StringBuilder resp = new StringBuilder(); resp.Append(""); - + resp.Append(string.Format(@" OK lib_session @@ -678,7 +666,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice ", ids[i],i,m_freeSwitchRealm,dt)); } - + resp.Append(""); response["str_response_string"] = resp.ToString(); @@ -694,7 +682,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice string requestbody = (string)request["body"]; string uri = (string)request["uri"]; string contenttype = (string)request["content-type"]; - + Hashtable requestBody = parseRequestBody((string)request["body"]); //string pwd = (string) requestBody["pwd"]; @@ -712,7 +700,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice pos++; if (s == userid) break; - } } } @@ -735,7 +722,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice ", userid, pos, avatarName); - + response["int_response_code"] = 200; return response; /* @@ -752,13 +739,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice public Hashtable FreeSwitchConfigHTTPHandler(Hashtable request) { m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler called with {0}", (string)request["body"]); - + Hashtable response = new Hashtable(); response["str_response_string"] = string.Empty; // all the params come as NVPs in the request body Hashtable requestBody = parseRequestBody((string) request["body"]); - // is this a dialplan or directory request + // is this a dialplan or directory request string section = (string) requestBody["section"]; if (section == "directory") @@ -767,40 +754,39 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice response = m_FreeSwitchDialplan.HandleDialplanRequest(m_freeSwitchContext, m_freeSwitchRealm, requestBody); else m_log.WarnFormat("[FreeSwitchVoice]: section was {0}", section); - - // XXX: re-generate dialplan: + + // XXX: re-generate dialplan: // - conf == region UUID // - conf number = region port // -> TODO Initialise(): keep track of regions via events - // re-generate accounts for all avatars + // re-generate accounts for all avatars // -> TODO Initialise(): keep track of avatars via events Regex normalizeEndLines = new Regex(@"\r\n", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler return {0}",normalizeEndLines.Replace(((string)response["str_response_string"]), "")); return response; } - + public Hashtable parseRequestBody(string body) { Hashtable bodyParams = new Hashtable(); // split string string [] nvps = body.Split(new Char [] {'&'}); - foreach (string s in nvps) { - + foreach (string s in nvps) + { if (s.Trim() != "") { string [] nvp = s.Split(new Char [] {'='}); bodyParams.Add(HttpUtility.UrlDecode(nvp[0]), HttpUtility.UrlDecode(nvp[1])); } } - + return bodyParams; } private string ChannelUri(Scene scene, LandData land) { - string channelUri = null; string landUUID; @@ -808,12 +794,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice // Create parcel voice channel. If no parcel exists, then the voice channel ID is the same // as the directory ID. Otherwise, it reflects the parcel's ID. - + lock (m_ParcelAddress) { if (m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) { - m_log.DebugFormat("[FreeSwitchVoice]: parcel id {0}: using sip address {1}", + m_log.DebugFormat("[FreeSwitchVoice]: parcel id {0}: using sip address {1}", land.GlobalID, m_ParcelAddress[land.GlobalID.ToString()]); return m_ParcelAddress[land.GlobalID.ToString()]; } @@ -823,22 +809,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice { landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name); landUUID = land.GlobalID.ToString(); - m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", + m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", landName, land.LocalID, landUUID); } else { landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName); landUUID = scene.RegionInfo.RegionID.ToString(); - m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", + m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", landName, land.LocalID, landUUID); } System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); - + // slvoice handles the sip address differently if it begins with confctl, hiding it from the user in the friends list. however it also disables // 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. channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(encoding.GetBytes(landUUID)), m_freeSwitchRealm); - + lock (m_ParcelAddress) { if (!m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) @@ -849,14 +835,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice return channelUri; } - + private static bool CustomCertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) { - return true; - } } + public class MonoCert : ICertificatePolicy { #region ICertificatePolicy Members 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 { serialiser.LoadPrimsFromXml2( scene, - m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + Slash.DirectorySeparatorChar + "objects.xml"); - + scene.RequestModuleInterface().LoadFromFile( - m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + Slash.DirectorySeparatorChar + "heightmap.r32"); - + m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ")."); } else { m_log.ErrorFormat( - "[SVNBACKUP]: Region load of {0} failed - no serialisation module available", + "[SVNBACKUP]: Region load of {0} failed - no serialisation module available", scene.RegionInfo.RegionName); } } -- cgit v1.1 From 7665aad002ef066fc31fa9497225d2668641c769 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 22 Feb 2010 13:27:17 -0800 Subject: * Adds CreatorID to asset metadata. This is just the plumbing to support CreatorID, it doesn't modify database backends or OAR files to support storing/loading it --- OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs index 8ea7ad3..4a5248b 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 public UUID SaveBitmap(Bitmap data, bool lossless, bool temporary) { - AssetBase asset = new AssetBase(UUID.Random(), "MRMDynamicImage", (sbyte)AssetType.Texture); + AssetBase asset = new AssetBase(UUID.Random(), "MRMDynamicImage", (sbyte)AssetType.Texture, m_scene.RegionInfo.RegionID); asset.Data = OpenJPEG.EncodeFromImage(data, lossless); asset.Description = "MRM Image"; asset.Local = false; -- cgit v1.1 From df76e95aa2dc9f3f3a0c546761b7624adc183ed0 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 22 Feb 2010 14:18:59 -0800 Subject: Changed asset CreatorID to a string --- OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs index 4a5248b..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 public UUID SaveBitmap(Bitmap data, bool lossless, bool temporary) { - AssetBase asset = new AssetBase(UUID.Random(), "MRMDynamicImage", (sbyte)AssetType.Texture, m_scene.RegionInfo.RegionID); + AssetBase asset = new AssetBase(UUID.Random(), "MRMDynamicImage", (sbyte)AssetType.Texture, m_scene.RegionInfo.RegionID.ToString()); asset.Data = OpenJPEG.EncodeFromImage(data, lossless); asset.Description = "MRM Image"; asset.Local = false; -- cgit v1.1 From 5c5966545d14de43500b95109e8ce81058ebe2c3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 28 Feb 2010 12:07:38 -0800 Subject: Initial Online friends notification seems to be working reliably now. All this needs more testing, but everything is there. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++-- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index f54733d..92e5a13 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -679,7 +679,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event DeRezObject OnDeRezObject; public event Action OnRegionHandShakeReply; public event GenericCall2 OnRequestWearables; - public event GenericCall2 OnCompleteMovementToRegion; + public event GenericCall1 OnCompleteMovementToRegion; public event UpdateAgent OnAgentUpdate; public event AgentRequestSit OnAgentRequestSit; public event AgentSit OnAgentSit; @@ -913,7 +913,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server if (OnCompleteMovementToRegion != null) { - OnCompleteMovementToRegion(); + OnCompleteMovementToRegion(this); } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index ea46945..17453f1 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 public event DeRezObject OnDeRezObject; public event Action OnRegionHandShakeReply; public event GenericCall2 OnRequestWearables; - public event GenericCall2 OnCompleteMovementToRegion; + public event GenericCall1 OnCompleteMovementToRegion; public event UpdateAgent OnAgentUpdate; public event AgentRequestSit OnAgentRequestSit; public event AgentSit OnAgentSit; @@ -744,7 +744,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC if (OnCompleteMovementToRegion != null) { - OnCompleteMovementToRegion(); + OnCompleteMovementToRegion(this); } } public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) -- cgit v1.1 From 44e7224b86dbcd369ce2569328e3b00fc3b209ab Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 28 Feb 2010 22:47:31 +0000 Subject: Add missing ChangeUserRights packet sender --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++++ OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 92e5a13..cbe3c77 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1675,5 +1675,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) { } + + public void SendChangeUserRights(UUID friendID, int rights) + { + } } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 17453f1..7987929 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1155,5 +1155,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) { } + + public void SendChangeUserRights(UUID friendID, int rights) + { + } } } -- cgit v1.1 From 86c621fdc77fadb898cf53578e83746cd8f8711b Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 28 Feb 2010 22:56:31 +0000 Subject: Change the signature of SendChangeUserRights, because we have to send this to both parties --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index cbe3c77..96530a1 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1676,7 +1676,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { } - public void SendChangeUserRights(UUID friendID, int rights) + public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) { } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 7987929..f8ab8d8 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1156,7 +1156,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } - public void SendChangeUserRights(UUID friendID, int rights) + public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) { } } -- cgit v1.1