public MuteList[] GetMuteList(UUID PrincipalID) { List<MuteList> Mutes = new List<MuteList>(); Dictionary<string, OSDMap> Map = null; #if (!ISWIN) foreach (string mServerUri in m_ServerURIs) { if (SimianUtils.GetGenericEntries(PrincipalID, "MuteList", mServerUri, out Map)) { foreach (object OSDMap in Map.Values) { MuteList mute = new MuteList(); mute.FromOSD((OSDMap) OSDMap); Mutes.Add(mute); } return Mutes.ToArray(); } } #else if (m_ServerURIs.Any(m_ServerURI => SimianUtils.GetGenericEntries(PrincipalID, "MuteList", m_ServerURI, out Map))) { foreach (object OSDMap in Map.Values) { MuteList mute = new MuteList(); mute.FromOSD((OSDMap) OSDMap); Mutes.Add(mute); } return Mutes.ToArray(); } #endif return null; }
public void UpdateMute(MuteList mute, UUID PrincipalID) { foreach (string m_ServerURI in m_ServerURIs) { SimianUtils.AddGeneric(PrincipalID, "MuteList", mute.MuteID.ToString(), Util.DictionaryToOSD(mute.ToKeyValuePairs()), m_ServerURI); } }
public override IDataTransferable Duplicate() { MuteList m = new MuteList(); m.FromOSD(ToOSD()); return(m); }
public void UpdateMute (MuteList mute, UUID AgentID) { List<string> serverURIs = m_registry.RequestModuleInterface<IConfigurationService> ().FindValueOf (AgentID.ToString (), "FriendsServerURI"); if (serverURIs.Count > 0) //Remote user... or should be m_remoteService.UpdateMute (mute, AgentID); else m_localService.UpdateMute (mute, AgentID); }
public MuteList[] GetMuteList(UUID PrincipalID) { List<MuteList> Mutes = new List<MuteList>(); Dictionary<string, OSDMap> Map; if (SimianUtils.GetGenericEntries(PrincipalID, "MuteList", m_ServerURI, out Map)) { foreach (object OSDMap in Map.Values) { MuteList mute = new MuteList(); mute.FromOSD((OSDMap)OSDMap); Mutes.Add(mute); } return Mutes.ToArray(); } return null; }
public MuteList[] GetMuteList(UUID PrincipalID) { Dictionary<string, object> sendData = new Dictionary<string,object>(); sendData["PRINCIPALID"] = PrincipalID.ToString(); sendData["METHOD"] = "getmutelist"; string reqString = WebUtils.BuildQueryString(sendData); List<MuteList> Mutes = new List<MuteList>(); try { List<string> m_ServerURIs = m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf(PrincipalID.ToString(), "RemoteServerURI"); foreach (string m_ServerURI in m_ServerURIs) { string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI + "/auroradata", reqString); if (reply != string.Empty) { Dictionary<string, object> replyData = WebUtils.ParseXmlResponse(reply); foreach (object f in replyData) { KeyValuePair<string, object> value = (KeyValuePair<string, object>)f; if (value.Value is Dictionary<string, object>) { Dictionary<string, object> valuevalue = value.Value as Dictionary<string, object>; MuteList mute = new MuteList(); mute.FromKVP(valuevalue); Mutes.Add(mute); } } } } return Mutes.ToArray(); } catch (Exception e) { m_log.DebugFormat("[AuroraRemoteMuteListConnector]: Exception when contacting server: {0}", e.ToString()); } return Mutes.ToArray(); }
/// <summary> /// Update the mute in the database /// </summary> /// <param name = "MuteID"></param> /// <param name = "Name"></param> /// <param name = "Flags"></param> /// <param name = "AgentID"></param> public void UpdateMuteList(UUID MuteID, string Name, int Flags, UUID AgentID) { if (MuteID == UUID.Zero) return; MuteList Mute = new MuteList { MuteID = MuteID, MuteName = Name, MuteType = Flags.ToString() }; MuteListConnector.UpdateMute(Mute, AgentID); MuteListCache.Remove(AgentID); }
/// <summary> /// Get all the mutes from the database /// </summary> /// <param name = "AgentID"></param> /// <param name = "Cached"></param> /// <returns></returns> public MuteList[] GetMutes(UUID AgentID, out bool Cached) { Cached = false; MuteList[] List = new MuteList[0]; if (MuteListConnector == null) return List; if (!MuteListCache.TryGetValue(AgentID, out List)) List = MuteListConnector.GetMuteList(AgentID).ToArray(); else Cached = true; return List; }
public byte[] UpdateMute(Dictionary<string, object> request) { MuteList mute = new MuteList(); mute.FromKVP(request); UUID PRINCIPALID = UUID.Parse(request["PRINCIPALID"].ToString()); MuteListConnector.UpdateMute(mute, PRINCIPALID); return SuccessResult(); }
public void UpdateMute(MuteList mute, UUID AgentID) { object remoteValue = DoRemote(mute, AgentID); if (remoteValue != null || m_doRemoteOnly) return; GenericUtils.AddGeneric(AgentID, "MuteList", mute.MuteID.ToString(), mute.ToOSD(), GD); }
public void UpdateMute(MuteList mute, UUID PrincipalID) { Dictionary<string, object> sendData = mute.ToKeyValuePairs(); sendData["PRINCIPALID"] = PrincipalID.ToString(); sendData["METHOD"] = "updatemute"; string reqString = WebUtils.BuildQueryString(sendData); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI + "/auroradata", reqString); } catch (Exception e) { m_log.DebugFormat("[AuroraRemoteMuteListConnector]: Exception when contacting server: {0}", e.Message); } }
public void UpdateMute(MuteList mute, UUID PrincipalID) { Dictionary<string, object> sendData = mute.ToKeyValuePairs(); sendData["PRINCIPALID"] = PrincipalID.ToString(); sendData["METHOD"] = "updatemute"; string reqString = WebUtils.BuildQueryString(sendData); try { List<string> m_ServerURIs = m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf(PrincipalID.ToString(), "RemoteServerURI"); foreach (string m_ServerURI in m_ServerURIs) { AsynchronousRestObjectRequester.MakeRequest("POST", m_ServerURI + "/auroradata", reqString); } } catch (Exception e) { m_log.DebugFormat("[AuroraRemoteMuteListConnector]: Exception when contacting server: {0}", e.ToString()); } }
public override IDataTransferable Duplicate() { MuteList m = new MuteList(); m.FromOSD(ToOSD()); return m; }
/// <summary> /// Updates or adds a mute for the given agent /// </summary> /// <param name="mute"></param> /// <param name="AgentID"></param> public void UpdateMute(MuteList mute, UUID AgentID) { GenericUtils.AddGeneric(AgentID, "MuteList", mute.MuteID.ToString(), mute.ToOSD(), GD); }
public void UpdateMute (MuteList mute, UUID AgentID) { m_localService.UpdateMute (mute, AgentID); m_remoteService.UpdateMute (mute, AgentID); }
public void UpdateMute(MuteList mute, UUID PrincipalID) { foreach (string m_ServerURI in m_ServerURIs) { SimianUtils.AddGeneric(PrincipalID, "MuteList", mute.MuteID.ToString(), mute.ToOSD(), m_ServerURI); } }