aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs65
1 files changed, 33 insertions, 32 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 56c0d98..6b942cb 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -176,6 +176,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
176 176
177 scene.EventManager.OnNewClient += OnNewClient; 177 scene.EventManager.OnNewClient += OnNewClient;
178 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 178 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
179
179 // The InstantMessageModule itself doesn't do this, 180 // The InstantMessageModule itself doesn't do this,
180 // so lets see if things explode if we don't do it 181 // so lets see if things explode if we don't do it
181 // scene.EventManager.OnClientClosed += OnClientClosed; 182 // scene.EventManager.OnClientClosed += OnClientClosed;
@@ -509,7 +510,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
509 IClientAPI ejectee = GetActiveClient(ejecteeID); 510 IClientAPI ejectee = GetActiveClient(ejecteeID);
510 if (ejectee != null) 511 if (ejectee != null)
511 { 512 {
512 UUID groupID = new UUID(im.imSessionID); 513 UUID groupID = new UUID(im.fromAgentID);
513 ejectee.SendAgentDropGroup(groupID); 514 ejectee.SendAgentDropGroup(groupID);
514 } 515 }
515 } 516 }
@@ -600,14 +601,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
600 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) 601 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
601 { 602 {
602 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 603 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
603 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); 604 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID);
604 605
605 if (m_debugEnabled) 606 if (m_debugEnabled)
606 { 607 {
607 foreach (GroupMembersData member in data) 608 foreach (GroupMembersData member in data)
608 { 609 {
609 m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner); 610 m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner);
610 } 611 }
611 } 612 }
612 613
613 return data; 614 return data;
@@ -627,14 +628,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
627 { 628 {
628 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 629 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
629 630
630 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID); 631 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID);
631 632
632 if (m_debugEnabled) 633 if (m_debugEnabled)
633 { 634 {
634 foreach (GroupRoleMembersData member in data) 635 foreach (GroupRoleMembersData member in data)
635 { 636 {
636 m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID); 637 m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID);
637 } 638 }
638 } 639 }
639 return data; 640 return data;
640 } 641 }
@@ -1143,11 +1144,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1143 OSDMap llDataStruct = new OSDMap(3); 1144 OSDMap llDataStruct = new OSDMap(3);
1144 llDataStruct.Add("AgentData", AgentData); 1145 llDataStruct.Add("AgentData", AgentData);
1145 llDataStruct.Add("GroupData", GroupData); 1146 llDataStruct.Add("GroupData", GroupData);
1146 llDataStruct.Add("NewGroupData", NewGroupData); 1147 llDataStruct.Add("NewGroupData", NewGroupData);
1147 1148
1148 if (m_debugEnabled) 1149 if (m_debugEnabled)
1149 { 1150 {
1150 m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct)); 1151 m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct));
1151 } 1152 }
1152 1153
1153 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); 1154 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
@@ -1307,16 +1308,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1307 // 1308 //
1308 } 1309 }
1309 1310
1310 #endregion 1311 #endregion
1311 1312
1312 private UUID GetRequestingAgentID(IClientAPI client) 1313 private UUID GetRequestingAgentID(IClientAPI client)
1313 { 1314 {
1314 UUID requestingAgentID = UUID.Zero; 1315 UUID requestingAgentID = UUID.Zero;
1315 if (client != null) 1316 if (client != null)
1316 { 1317 {
1317 requestingAgentID = client.AgentId; 1318 requestingAgentID = client.AgentId;
1318 } 1319 }
1319 return requestingAgentID; 1320 return requestingAgentID;
1320 } 1321 }
1321 } 1322 }
1322 1323