示例#1
0
        public bool AddOfflineMessage(GridInstantMessage message)
        {
            if (m_doRemoteOnly)
            {
                object remoteValue = DoRemote(message);
                return(remoteValue != null && (bool)remoteValue);
            }

            if (m_maxOfflineMessages <= 0 ||
                GenericUtils.GetGenericCount(message.ToAgentID, "OfflineMessages", GD) < m_maxOfflineMessages)
            {
                GenericUtils.AddGeneric(message.ToAgentID, "OfflineMessages", UUID.Random().ToString(),
                                        message.ToOSD(), GD);
                return(true);
            }
            return(false);
        }
 /// <summary>
 ///     Gets the number of list of generic T's from the database
 /// </summary>
 /// <param name="OwnerID"></param>
 /// <param name="Type"></param>
 /// <returns></returns>
 public int GetGenericCount(UUID OwnerID, string Type)
 {
     return(GenericUtils.GetGenericCount(OwnerID, Type, GD));
 }
 /// <summary>
 ///     Gets the number of list of generic T's from the database
 /// </summary>
 /// <param name="ownerID"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public int GetGenericCount(UUID ownerID, string type)
 {
     return(GenericUtils.GetGenericCount(ownerID, type, genData));
 }