aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
diff options
context:
space:
mode:
authorunknown2010-05-14 15:06:13 -0700
committerJustin Clark-Casey (justincc)2010-05-14 23:40:40 +0100
commit2c8d25a11029429aa7b146e3c2be57093046dd15 (patch)
tree4b8c1a32b9028b1095a24fbd966f0202c7242549 /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
parentback port groups changes (diff)
downloadopensim-SC-2c8d25a11029429aa7b146e3c2be57093046dd15.zip
opensim-SC-2c8d25a11029429aa7b146e3c2be57093046dd15.tar.gz
opensim-SC-2c8d25a11029429aa7b146e3c2be57093046dd15.tar.bz2
opensim-SC-2c8d25a11029429aa7b146e3c2be57093046dd15.tar.xz
* Allows both old and new OpenSim.ini params for the XmlRpc Groups Service Connector
* Fix problem with RequestingAgentID not being sent correctly to server resulting in failed xmlrpc calls * Improved debug output
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index edd5af7..3e05732 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -342,7 +342,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
342 342
343 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) 343 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
344 { 344 {
345 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 345 if (m_debugEnabled)
346 {
347 m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
348 m_log.DebugFormat("[GROUPS]: remoteClient ({0}) im ({1})", remoteClient, im);
349
350 }
351
346 352
347 // Group invitations 353 // Group invitations
348 if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline)) 354 if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline))
@@ -481,7 +487,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
481 if (member.AcceptNotices) 487 if (member.AcceptNotices)
482 { 488 {
483 // Build notice IIM 489 // Build notice IIM
484 GridInstantMessage msg = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); 490 GridInstantMessage msg = CreateGroupNoticeIM(GetRequestingAgentID(remoteClient), NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice);
485 491
486 msg.toAgentID = member.AgentID.Guid; 492 msg.toAgentID = member.AgentID.Guid;
487 OutgoingInstantMessage(msg, member.AgentID); 493 OutgoingInstantMessage(msg, member.AgentID);
@@ -1024,12 +1030,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1024 1030
1025 public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID) 1031 public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID)
1026 { 1032 {
1027 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 1033 if (m_debugEnabled)
1034 {
1035 m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1036 m_log.DebugFormat("[GROUPS]: remoteClient({0}) groupID({0}) invitedAgentID({0}) roleID({0})", remoteClient, groupID, invitedAgentID, roleID);
1037 }
1038
1028 1039
1029 // Todo: Security check, probably also want to send some kind of notification 1040 // Todo: Security check, probably also want to send some kind of notification
1030 UUID InviteID = UUID.Random(); 1041 UUID InviteID = UUID.Random();
1031 1042
1032 m_groupData.AddAgentToGroupInvite(GetRequestingAgentID(remoteClient), InviteID, groupID, roleID, invitedAgentID); 1043 UUID requestingAgentID = GetRequestingAgentID(remoteClient);
1044 if (requestingAgentID == UUID.Zero)
1045 {
1046 m_log.Error("[GROUPS] Group Invite Requires a valid requesting agent to be specified");
1047 }
1048 m_groupData.AddAgentToGroupInvite(requestingAgentID, InviteID, groupID, roleID, invitedAgentID);
1033 1049
1034 // Check to see if the invite went through, if it did not then it's possible 1050 // Check to see if the invite went through, if it did not then it's possible
1035 // the remoteClient did not validate or did not have permission to invite. 1051 // the remoteClient did not validate or did not have permission to invite.