private OSDMap RemoveGroupNotice(OSDMap map, UUID requestingAgentID)
{
OSDMap resp = new OSDMap();
if (!map.ContainsKey("GroupID") || !map.ContainsKey("NoticeID"))
{
resp["Failed"] = new OSDString("Missing required arguments one or more of GroupID, NoticeID");
}
else
{
UUID GroupID = UUID.Zero;
UUID.TryParse(map["GroupID"].ToString(), out GroupID);
UUID noticeID = UUID.Zero;
UUID.TryParse(map["NoticeID"].ToString(), out noticeID);
IGroupsServiceConnector groups = Aurora.DataManager.DataManager.RequestPlugin<IGroupsServiceConnector>();
if (GroupID == UUID.Zero)
{
resp["Failed"] = new OSDString("GroupID was UUID.Zero");
}
else if (noticeID == UUID.Zero)
{
resp["Failed"] = new OSDString("NoticeID was UUID.Zero");
}
else if (groups == null)
{
resp["Failed"] = new OSDString("Could not findIGroupsServiceConnector");
}
else
{
try
{
resp["Success"] = groups.RemoveGroupNotice(requestingAgentID, GroupID, noticeID);
}
catch
{
resp["Failed"] = new OSDString("An exception was thrown.");
}
}
}
return resp;
}