aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs144
1 files changed, 72 insertions, 72 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index 8e7aa68..523dfbe 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -68,14 +68,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
68 private string m_groupReadKey = string.Empty; 68 private string m_groupReadKey = string.Empty;
69 private string m_groupWriteKey = string.Empty; 69 private string m_groupWriteKey = string.Empty;
70 70
71 private IUserAccountService m_accountService = null; 71 private IUserAccountService m_accountService = null;
72 72
73 // Used to track which agents are have dropped from a group chat session 73 // Used to track which agents are have dropped from a group chat session
74 // Should be reset per agent, on logon 74 // Should be reset per agent, on logon
75 // TODO: move this to Flotsam XmlRpc Service 75 // TODO: move this to Flotsam XmlRpc Service
76 // SessionID, List<AgentID> 76 // SessionID, List<AgentID>
77 private Dictionary<UUID, List<UUID>> m_groupsAgentsDroppedFromChatSession = new Dictionary<UUID, List<UUID>>(); 77 private Dictionary<UUID, List<UUID>> m_groupsAgentsDroppedFromChatSession = new Dictionary<UUID, List<UUID>>();
78 private Dictionary<UUID, List<UUID>> m_groupsAgentsInvitedToChatSession = new Dictionary<UUID, List<UUID>>(); 78 private Dictionary<UUID, List<UUID>> m_groupsAgentsInvitedToChatSession = new Dictionary<UUID, List<UUID>>();
79 79
80 80
81 #region IRegionModuleBase Members 81 #region IRegionModuleBase Members
@@ -111,12 +111,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
111 return; 111 return;
112 } 112 }
113 113
114 m_log.InfoFormat("[GROUPS-CONNECTOR]: Initializing {0}", this.Name); 114 m_log.InfoFormat("[GROUPS-CONNECTOR]: Initializing {0}", this.Name);
115 115
116 m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty); 116 m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
117 if ((m_groupsServerURI == null) || 117 if ((m_groupsServerURI == null) ||
118 (m_groupsServerURI == string.Empty)) 118 (m_groupsServerURI == string.Empty))
119 { 119 {
120 m_log.ErrorFormat("Please specify a valid URL for GroupsServerURI in OpenSim.ini, [Groups]"); 120 m_log.ErrorFormat("Please specify a valid URL for GroupsServerURI in OpenSim.ini, [Groups]");
121 m_connectorEnabled = false; 121 m_connectorEnabled = false;
122 return; 122 return;
@@ -766,67 +766,67 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
766 766
767 767
768 768
769 #endregion 769 #endregion
770 770
771 #region GroupSessionTracking 771 #region GroupSessionTracking
772 772
773 public void ResetAgentGroupChatSessions(UUID agentID) 773 public void ResetAgentGroupChatSessions(UUID agentID)
774 { 774 {
775 foreach (List<UUID> agentList in m_groupsAgentsDroppedFromChatSession.Values) 775 foreach (List<UUID> agentList in m_groupsAgentsDroppedFromChatSession.Values)
776 { 776 {
777 agentList.Remove(agentID); 777 agentList.Remove(agentID);
778 } 778 }
779 } 779 }
780 780
781 public bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID) 781 public bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID)
782 { 782 {
783 // If we're tracking this group, and we can find them in the tracking, then they've been invited 783 // If we're tracking this group, and we can find them in the tracking, then they've been invited
784 return m_groupsAgentsInvitedToChatSession.ContainsKey(groupID) 784 return m_groupsAgentsInvitedToChatSession.ContainsKey(groupID)
785 && m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID); 785 && m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID);
786 } 786 }
787 787
788 public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID) 788 public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID)
789 { 789 {
790 // If we're tracking drops for this group, 790 // If we're tracking drops for this group,
791 // and we find them, well... then they've dropped 791 // and we find them, well... then they've dropped
792 return m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID) 792 return m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID)
793 && m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID); 793 && m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID);
794 } 794 }
795 795
796 public void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID) 796 public void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID)
797 { 797 {
798 if (m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID)) 798 if (m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID))
799 { 799 {
800 // If not in dropped list, add 800 // If not in dropped list, add
801 if (!m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID)) 801 if (!m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID))
802 { 802 {
803 m_groupsAgentsDroppedFromChatSession[groupID].Add(agentID); 803 m_groupsAgentsDroppedFromChatSession[groupID].Add(agentID);
804 } 804 }
805 } 805 }
806 } 806 }
807 807
808 public void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID) 808 public void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID)
809 { 809 {
810 // Add Session Status if it doesn't exist for this session 810 // Add Session Status if it doesn't exist for this session
811 CreateGroupChatSessionTracking(groupID); 811 CreateGroupChatSessionTracking(groupID);
812 812
813 // If nessesary, remove from dropped list 813 // If nessesary, remove from dropped list
814 if (m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID)) 814 if (m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID))
815 { 815 {
816 m_groupsAgentsDroppedFromChatSession[groupID].Remove(agentID); 816 m_groupsAgentsDroppedFromChatSession[groupID].Remove(agentID);
817 } 817 }
818 } 818 }
819 819
820 private void CreateGroupChatSessionTracking(UUID groupID) 820 private void CreateGroupChatSessionTracking(UUID groupID)
821 { 821 {
822 if (!m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID)) 822 if (!m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID))
823 { 823 {
824 m_groupsAgentsDroppedFromChatSession.Add(groupID, new List<UUID>()); 824 m_groupsAgentsDroppedFromChatSession.Add(groupID, new List<UUID>());
825 m_groupsAgentsInvitedToChatSession.Add(groupID, new List<UUID>()); 825 m_groupsAgentsInvitedToChatSession.Add(groupID, new List<UUID>());
826 } 826 }
827 827
828 } 828 }
829 #endregion 829 #endregion
830 830
831 #region XmlRpcHashtableMarshalling 831 #region XmlRpcHashtableMarshalling
832 private GroupProfileData GroupProfileHashtableToGroupProfileData(Hashtable groupProfile) 832 private GroupProfileData GroupProfileHashtableToGroupProfileData(Hashtable groupProfile)