aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs39
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs15
3 files changed, 59 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}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index f439f34..aab91df 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -99,5 +99,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
99 void osMessageObject(key objectUUID,string message); 99 void osMessageObject(key objectUUID,string message);
100 100
101 void osMakeNotecard(string notecardName, LSL_Types.list contents); 101 void osMakeNotecard(string notecardName, LSL_Types.list contents);
102
103 // Grid Info Functions
104 string osGetGridNick();
105 string osGetGridName();
106 string osGetGridLoginURI();
102 } 107 }
103} 108}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index ceb0f37..50acc1e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -247,6 +247,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
247 m_OSSL_Functions.osMakeNotecard(notecardName, contents); 247 m_OSSL_Functions.osMakeNotecard(notecardName, contents);
248 } 248 }
249 249
250 public string osGetGridNick()
251 {
252 return m_OSSL_Functions.osGetGridNick();
253 }
254
255 public string osGetGridName()
256 {
257 return m_OSSL_Functions.osGetGridName();
258 }
259
260 public string osGetGridLoginURI()
261 {
262 return m_OSSL_Functions.osGetGridLoginURI();
263 }
264
250 public OSSLPrim Prim; 265 public OSSLPrim Prim;
251 266
252 [Serializable] 267 [Serializable]