diff options
author | Melanie Thielker | 2009-02-16 01:22:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-02-16 01:22:37 +0000 |
commit | 7d77e0e703cc383c2bf68bb283518bf9fd2e009c (patch) | |
tree | d288ba8d264cd142c908919158202c3929191aaf /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | More guards around SetHeight. (diff) | |
download | opensim-SC_OLD-7d77e0e703cc383c2bf68bb283518bf9fd2e009c.zip opensim-SC_OLD-7d77e0e703cc383c2bf68bb283518bf9fd2e009c.tar.gz opensim-SC_OLD-7d77e0e703cc383c2bf68bb283518bf9fd2e009c.tar.bz2 opensim-SC_OLD-7d77e0e703cc383c2bf68bb283518bf9fd2e009c.tar.xz |
Thank you, patnad, for a patch that adds 3 new discovery functions
to OSSL.
Applied with changes.
Fixes Mantis #3172
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index fa09b0a..697fdb4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1066,5 +1066,44 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1066 | 1066 | ||
1067 | m_host.Inventory.AddInventoryItem(taskItem, false); | 1067 | m_host.Inventory.AddInventoryItem(taskItem, false); |
1068 | } | 1068 | } |
1069 | |||
1070 | /// Threat level is Moderate because intentional abuse, for instance | ||
1071 | /// scripts that are written to be malicious only on one grid, | ||
1072 | /// for instance in a HG scenario, are a distinct possibility. | ||
1073 | /// | ||
1074 | /// Use value from the config file and return it. | ||
1075 | /// | ||
1076 | public string osGetGridNick() | ||
1077 | { | ||
1078 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); | ||
1079 | m_host.AddScriptLPS(1); | ||
1080 | string nick = "hippogrid"; | ||
1081 | IConfigSource config = new IniConfigSource(Application.iniFilePath); | ||
1082 | if (config.Configs["GridInfo"] != null) | ||
1083 | nick = config.Configs["GridInfo"].GetString("gridnick", nick); | ||
1084 | return nick; | ||
1085 | } | ||
1086 | |||
1087 | public string osGetGridName() | ||
1088 | { | ||
1089 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); | ||
1090 | m_host.AddScriptLPS(1); | ||
1091 | string name = "the lost continent of hippo"; | ||
1092 | IConfigSource config = new IniConfigSource(Application.iniFilePath); | ||
1093 | if (config.Configs["GridInfo"] != null) | ||
1094 | name = config.Configs["GridInfo"].GetString("gridname", name); | ||
1095 | return name; | ||
1096 | } | ||
1097 | |||
1098 | public string osGetGridLoginURI() | ||
1099 | { | ||
1100 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); | ||
1101 | m_host.AddScriptLPS(1); | ||
1102 | string loginURI = "http://127.0.0.1:9000/"; | ||
1103 | IConfigSource config = new IniConfigSource(Application.iniFilePath); | ||
1104 | if (config.Configs["GridInfo"] != null) | ||
1105 | loginURI = config.Configs["GridInfo"].GetString("login", loginURI); | ||
1106 | return loginURI; | ||
1107 | } | ||
1069 | } | 1108 | } |
1070 | } | 1109 | } |