byte[] HandleGetNotices(Dictionary <string, object> request)
        {
            Dictionary <string, object> result = new Dictionary <string, object>();

            if (!request.ContainsKey("RequestingAgentID"))
            {
                NullResult(result, "Bad network data");
            }

            else if (request.ContainsKey("NoticeID")) // just one
            {
                GroupNoticeInfo notice = m_GroupsService.GetGroupNotice(request["RequestingAgentID"].ToString(), new UUID(request["NoticeID"].ToString()));

                if (notice == null)
                {
                    NullResult(result, "NO such notice");
                }
                else
                {
                    result["RESULT"] = GroupsDataUtils.GroupNoticeInfo(notice);
                }
            }
            else if (request.ContainsKey("GroupID")) // all notices for group
            {
                List <ExtendedGroupNoticeData> notices = m_GroupsService.GetGroupNotices(request["RequestingAgentID"].ToString(), new UUID(request["GroupID"].ToString()));

                if (notices == null || (notices != null && notices.Count == 0))
                {
                    NullResult(result, "No notices");
                }
                else
                {
                    Dictionary <string, object> dict = new Dictionary <string, object>();
                    int i = 0;
                    foreach (ExtendedGroupNoticeData n in notices)
                    {
                        dict["n-" + i++] = GroupsDataUtils.GroupNoticeData(n);
                    }

                    result["RESULT"] = dict;
                }
            }
            else
            {
                NullResult(result, "Bad OP in request");
            }

            string xmlString = ServerUtils.BuildXmlResponse(result);

            return(Util.UTF8NoBomEncoding.GetBytes(xmlString));
        }
 public List <ExtendedGroupNoticeData> GetGroupNotices(string RequestingAgentID, UUID GroupID)
 {
     return(m_GroupsService.GetGroupNotices(RequestingAgentID, GroupID));
 }