aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs')
-rw-r--r--OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs42
1 files changed, 14 insertions, 28 deletions
diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
index f670272..4642b2a 100644
--- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
+++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
@@ -186,7 +186,6 @@ namespace OpenSim.Groups
186 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, 186 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment,
187 bool allowPublish, bool maturePublish, UUID founderID, out string reason) 187 bool allowPublish, bool maturePublish, UUID founderID, out string reason)
188 { 188 {
189 m_log.DebugFormat("[Groups]: Creating group {0}", name);
190 reason = string.Empty; 189 reason = string.Empty;
191 if (m_UserManagement.IsLocalGridUser(RequestingAgentID)) 190 if (m_UserManagement.IsLocalGridUser(RequestingAgentID))
192 return m_LocalGroupsConnector.CreateGroup(RequestingAgentID, name, charter, showInList, insigniaID, 191 return m_LocalGroupsConnector.CreateGroup(RequestingAgentID, name, charter, showInList, insigniaID,
@@ -255,7 +254,10 @@ namespace OpenSim.Groups
255 { 254 {
256 string url = string.Empty, gname = string.Empty; 255 string url = string.Empty, gname = string.Empty;
257 if (IsLocal(GroupID, out url, out gname)) 256 if (IsLocal(GroupID, out url, out gname))
258 return m_LocalGroupsConnector.GetGroupMembers(AgentUUI(RequestingAgentID), GroupID); 257 {
258 string agentID = AgentUUI(RequestingAgentID);
259 return m_LocalGroupsConnector.GetGroupMembers(agentID, GroupID);
260 }
259 else if (!string.IsNullOrEmpty(url)) 261 else if (!string.IsNullOrEmpty(url))
260 { 262 {
261 ExtendedGroupMembershipData membership = m_LocalGroupsConnector.GetAgentGroupMembership(RequestingAgentID, RequestingAgentID, GroupID); 263 ExtendedGroupMembershipData membership = m_LocalGroupsConnector.GetAgentGroupMembership(RequestingAgentID, RequestingAgentID, GroupID);
@@ -397,17 +399,21 @@ namespace OpenSim.Groups
397 399
398 if (success) 400 if (success)
399 { 401 {
402 // Here we always return true. The user has been added to the local group,
403 // independent of whether the remote operation succeeds or not
400 url = m_UserManagement.GetUserServerURL(uid, "GroupsServerURI"); 404 url = m_UserManagement.GetUserServerURL(uid, "GroupsServerURI");
401 if (url == string.Empty) 405 if (url == string.Empty)
402 { 406 {
403 reason = "User doesn't have a groups server"; 407 reason = "You don't have an accessible groups server in your home world. You membership to this group in only within this grid.";
404 return false; 408 return true;
405 } 409 }
406 410
407 GroupsServiceHGConnector c = GetConnector(url); 411 GroupsServiceHGConnector c = GetConnector(url);
408 if (c != null) 412 if (c != null)
409 return c.CreateProxy(AgentUUI(RequestingAgentID), AgentID, token, GroupID, m_LocalGroupsServiceLocation, name, out reason); 413 c.CreateProxy(AgentUUI(RequestingAgentID), AgentID, token, GroupID, m_LocalGroupsServiceLocation, name, out reason);
414 return true;
410 } 415 }
416 return false;
411 } 417 }
412 } 418 }
413 else if (m_UserManagement.IsLocalGridUser(uid)) // local user 419 else if (m_UserManagement.IsLocalGridUser(uid)) // local user
@@ -544,7 +550,6 @@ namespace OpenSim.Groups
544 List<string> urls = new List<string>(); 550 List<string> urls = new List<string>();
545 foreach (GroupMembersData m in members) 551 foreach (GroupMembersData m in members)
546 { 552 {
547 UUID userID = UUID.Zero;
548 if (!m_UserManagement.IsLocalGridUser(m.AgentID)) 553 if (!m_UserManagement.IsLocalGridUser(m.AgentID))
549 { 554 {
550 string gURL = m_UserManagement.GetUserServerURL(m.AgentID, "GroupsServerURI"); 555 string gURL = m_UserManagement.GetUserServerURL(m.AgentID, "GroupsServerURI");
@@ -592,28 +597,6 @@ namespace OpenSim.Groups
592 return m_LocalGroupsConnector.GetGroupNotices(AgentUUI(RequestingAgentID), GroupID); 597 return m_LocalGroupsConnector.GetGroupNotices(AgentUUI(RequestingAgentID), GroupID);
593 } 598 }
594 599
595 public void ResetAgentGroupChatSessions(string agentID)
596 {
597 }
598
599 public bool hasAgentBeenInvitedToGroupChatSession(string agentID, UUID groupID)
600 {
601 return false;
602 }
603
604 public bool hasAgentDroppedGroupChatSession(string agentID, UUID groupID)
605 {
606 return false;
607 }
608
609 public void AgentDroppedFromGroupChatSession(string agentID, UUID groupID)
610 {
611 }
612
613 public void AgentInvitedToGroupChatSession(string agentID, UUID groupID)
614 {
615 }
616
617 #endregion 600 #endregion
618 601
619 #region hypergrid groups 602 #region hypergrid groups
@@ -685,6 +668,9 @@ namespace OpenSim.Groups
685 { 668 {
686 serviceLocation = string.Empty; 669 serviceLocation = string.Empty;
687 name = string.Empty; 670 name = string.Empty;
671 if (groupID.Equals(UUID.Zero))
672 return true;
673
688 ExtendedGroupRecord group = m_LocalGroupsConnector.GetGroupRecord(UUID.Zero.ToString(), groupID, string.Empty); 674 ExtendedGroupRecord group = m_LocalGroupsConnector.GetGroupRecord(UUID.Zero.ToString(), groupID, string.Empty);
689 if (group == null) 675 if (group == null)
690 { 676 {