master
Christopher 2020-06-10 13:13:47 +02:00
parent 6e628f5c6a
commit 0d5e67a9f6
1 changed files with 5 additions and 32 deletions

View File

@ -124,7 +124,7 @@ namespace OpenSim.Modules.DataValue
#region Script Funktions #region Script Funktions
private string getFilePath(UUID host, string index, bool privat) private string getFilePath(UUID host, string index)
{ {
SceneObjectGroup _host = m_scene.GetSceneObjectGroup(host); SceneObjectGroup _host = m_scene.GetSceneObjectGroup(host);
@ -132,9 +132,6 @@ namespace OpenSim.Modules.DataValue
{ {
string _nameSpace = _host.GroupID.ToString().Trim().ToUpper().Replace("-", ""); string _nameSpace = _host.GroupID.ToString().Trim().ToUpper().Replace("-", "");
if(privat == true)
_nameSpace = _host.OwnerID.ToString().Trim().ToUpper().Replace("-", "");
if (!Directory.Exists(m_dataValueDirectory)) if (!Directory.Exists(m_dataValueDirectory))
Directory.CreateDirectory(m_dataValueDirectory); Directory.CreateDirectory(m_dataValueDirectory);
@ -152,13 +149,7 @@ namespace OpenSim.Modules.DataValue
[ScriptInvocation] [ScriptInvocation]
public string osGetDataValue(UUID hostID, UUID scriptID, string key) public string osGetDataValue(UUID hostID, UUID scriptID, string key)
{ {
return osGetDataValue(hostID, scriptID, key, false); string _filePath = getFilePath(hostID, key);
}
[ScriptInvocation]
public string osGetDataValue(UUID hostID, UUID scriptID, string key, bool personal)
{
string _filePath = getFilePath(hostID, key, personal);
FileInfo file = new FileInfo(_filePath); FileInfo file = new FileInfo(_filePath);
@ -171,13 +162,7 @@ namespace OpenSim.Modules.DataValue
[ScriptInvocation] [ScriptInvocation]
public void osSetDataValue(UUID hostID, UUID scriptID, string key, string value) public void osSetDataValue(UUID hostID, UUID scriptID, string key, string value)
{ {
osSetDataValue(hostID, scriptID, key, value, false); string _filePath = getFilePath(hostID, key);
}
[ScriptInvocation]
public void osSetDataValue(UUID hostID, UUID scriptID, string key, string value, bool personal)
{
string _filePath = getFilePath(hostID, key, personal);
FileInfo file = new FileInfo(_filePath); FileInfo file = new FileInfo(_filePath);
@ -187,13 +172,7 @@ namespace OpenSim.Modules.DataValue
[ScriptInvocation] [ScriptInvocation]
public void osDeleteDataValue(UUID hostID, UUID scriptID, string key, string value) public void osDeleteDataValue(UUID hostID, UUID scriptID, string key, string value)
{ {
osDeleteDataValue(hostID, scriptID, key, false); string _filePath = getFilePath(hostID, key);
}
[ScriptInvocation]
public void osDeleteDataValue(UUID hostID, UUID scriptID, string key, bool personal)
{
string _filePath = getFilePath(hostID, key, personal);
FileInfo file = new FileInfo(_filePath); FileInfo file = new FileInfo(_filePath);
@ -204,13 +183,7 @@ namespace OpenSim.Modules.DataValue
[ScriptInvocation] [ScriptInvocation]
public bool osCheckDataValue(UUID hostID, UUID scriptID, string key, string value) public bool osCheckDataValue(UUID hostID, UUID scriptID, string key, string value)
{ {
return osCheckDataValue(hostID, scriptID, key, false); string _filePath = getFilePath(hostID, key);
}
[ScriptInvocation]
public bool osCheckDataValue(UUID hostID, UUID scriptID, string key, bool personal)
{
string _filePath = getFilePath(hostID, key, personal);
FileInfo file = new FileInfo(_filePath); FileInfo file = new FileInfo(_filePath);