private OSDMap GetAbuseReports(OSDMap map)
{
OSDMap resp = new OSDMap();
IAbuseReports ar_service = m_registry.RequestModuleInterface<IAbuseReports>();
int start = map["Start"].AsInteger();
int count = map["Count"].AsInteger();
bool active = map["Active"].AsBoolean();
List<AbuseReport> lar = ar_service.GetAbuseReports(start, count, active);
OSDArray AbuseReports = new OSDArray();
foreach (AbuseReport tar in lar)
{
AbuseReports.Add(tar.ToOSD());
}
resp["AbuseReports"] = AbuseReports;
resp["Start"] = OSD.FromInteger(start);
resp["Count"] = OSD.FromInteger(count); // we're not using the AbuseReports.Count because client implementations of the WebAPI can check the count themselves. This is just for showing the input.
resp["Active"] = OSD.FromBoolean(active);
return resp;
}