byte[] HandleAgentRole(Dictionary <string, object> request) { Dictionary <string, object> result = new Dictionary <string, object>(); if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("RoleID") || !request.ContainsKey("AgentID") || !request.ContainsKey("OP")) { NullResult(result, "Bad network data"); } else { string op = request["OP"].ToString(); bool success = false; if (op == "ADD") { success = m_GroupsService.AddAgentToGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString())); } else if (op == "DELETE") { success = m_GroupsService.RemoveAgentFromGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString())); } result["RESULT"] = success.ToString(); } string xmlString = ServerUtils.BuildXmlResponse(result); //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); return(Util.UTF8NoBomEncoding.GetBytes(xmlString)); }
public void RemoveAgentFromGroupRole(string RequestingAgentID, string AgentID, UUID GroupID, UUID RoleID) { m_GroupsService.RemoveAgentFromGroupRole(RequestingAgentID, AgentID, GroupID, RoleID); }