Ejemplo n.º 1
0
        private void OnUpdateMuteListEntry(IClientAPI client, UUID AgentID, int muteType, UUID muteID, string Name, uint muteFlags)
        {
            Dictionary <UUID, MuteListEntry> MuteList;
            bool isUpdate = false;

            MuteList = GetMuteList(AgentID);
            isUpdate = MuteList.ContainsKey(muteID);
            if (isUpdate)
            {
                MuteList.Remove(muteID);
            }

            switch ((MuteType)muteType)
            {
            case MuteType.BY_NAME:
                m_log.DebugFormat("[MUTE LIST] Update from {0} for name: {1} (ID {2}) flags={3}", AgentID, Name, muteID, muteFlags);
                break;

            case MuteType.AGENT:
                m_log.DebugFormat("[MUTE LIST] Update from {0} for agent: {1} ({2}) flags={3}", AgentID, muteID, Name, muteFlags);
                break;

            case MuteType.OBJECT:
                m_log.DebugFormat("[MUTE LIST] Update from {0} for object: {1} ({2}) flags={3}", AgentID, muteID, Name, muteFlags);
                break;

            case MuteType.GROUP:
                m_log.DebugFormat("[MUTE LIST] Update from {0} for group: {1} ({2}) flags={3}", AgentID, muteID, Name, muteFlags);
                break;

            case MuteType.COUNT:
                m_log.DebugFormat("[MUTE LIST] Update from {0} for count: {1} ({2}) flags={3}", AgentID, muteID, Name, muteFlags);
                break;

            default:
                m_log.ErrorFormat("[MUTE LIST] Update from {0} unknown type {1} with ID {2} Name {3} flags={4}", AgentID, muteType, muteID, Name, muteFlags);
                break;
            }
            MuteListEntry entry = new MuteListEntry(muteType, Name, muteFlags);

            MuteList.Add(muteID, entry);
            DBStoreMuteListEntry(AgentID, muteID, entry, isUpdate);
        }