Example #1
0
        private void setDataValue(UUID hostID, UUID scriptID, string key, string value, int privateStorage)
        {
            if (m_storage != null)
            {
                try
                {
                    SceneObjectPart _host = base.World.GetSceneObjectPart(hostID);

                    String storageNameSpace = _host.GroupID.ToString();

                    if (privateStorage == 1)
                    {
                        storageNameSpace = _host.OwnerID.ToString();
                    }

                    m_storage.save(storageNameSpace, key, value);
                    DataStorageEvents.onSetDataValue(storageNameSpace, key, value);
                    return;
                }
                catch (Exception _error)
                {
                    base.Logger.Error("[" + Name + "] osSetDataValue: " + _error.Message);
                }
            }
            else
            {
                base.Logger.Error("No data Storage aviable.");
            }
        }
 public void save(string data)
 {
     m_lastUseTime = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
     m_data        = data;
     m_storage.save(m_group, m_index, data);
 }