byte[] HandleSetActive(Dictionary <string, object> request) { Dictionary <string, object> result = new Dictionary <string, object>(); if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("AgentID") || !request.ContainsKey("OP")) { NullResult(result, "Bad network data"); string xmlString = ServerUtils.BuildXmlResponse(result); return(Util.UTF8NoBomEncoding.GetBytes(xmlString)); } else { string op = request["OP"].ToString(); if (op == "GROUP") { ExtendedGroupMembershipData group = m_GroupsService.SetAgentActiveGroup(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), new UUID(request["GroupID"].ToString())); if (group == null) { NullResult(result, "Internal error"); } else { result["RESULT"] = GroupsDataUtils.GroupMembershipData(group); } string xmlString = ServerUtils.BuildXmlResponse(result); //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); return(Util.UTF8NoBomEncoding.GetBytes(xmlString)); } else if (op == "ROLE" && request.ContainsKey("RoleID")) { m_GroupsService.SetAgentActiveGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString())); result["RESULT"] = "true"; } return(Util.UTF8NoBomEncoding.GetBytes(ServerUtils.BuildXmlResponse(result))); } }
public void SetAgentActiveGroupRole(string RequestingAgentID, string AgentID, UUID GroupID, UUID RoleID) { m_GroupsService.SetAgentActiveGroupRole(RequestingAgentID, AgentID, GroupID, RoleID); }