aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-05 20:14:53 +0000
committerJustin Clarke Casey2008-05-05 20:14:53 +0000
commit9655cf280779021e6241a08f8610cad9b982763f (patch)
tree82ef6d74969e4b64971d64a6a18e4488729167a8 /OpenSim/Region/ScriptEngine
parent* Just some tidy up and documentation before I make my first ever attempt to ... (diff)
downloadopensim-SC_OLD-9655cf280779021e6241a08f8610cad9b982763f.zip
opensim-SC_OLD-9655cf280779021e6241a08f8610cad9b982763f.tar.gz
opensim-SC_OLD-9655cf280779021e6241a08f8610cad9b982763f.tar.bz2
opensim-SC_OLD-9655cf280779021e6241a08f8610cad9b982763f.tar.xz
* Refactor: Break out permissions code into a separate region PermissionsModule
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs6
2 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index ca94dd7..54c26d9 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -180,8 +180,8 @@ namespace OpenSim.Region.ScriptEngine.Common
180 { 180 {
181 m_host.AddScriptLPS(1); 181 m_host.AddScriptLPS(1);
182 //Check to make sure that the script's owner is the estate manager/master 182 //Check to make sure that the script's owner is the estate manager/master
183 //World.PermissionsMngr.GenericEstatePermission( 183 //World.Permissions.GenericEstatePermission(
184 if (World.PermissionsMngr.GenericEstatePermission(m_host.OwnerID)) 184 if (World.Permissions.GenericEstatePermission(m_host.OwnerID))
185 { 185 {
186 World.EventManager.TriggerRequestChangeWaterHeight((float)height); 186 World.EventManager.TriggerRequestChangeWaterHeight((float)height);
187 } 187 }
@@ -2616,7 +2616,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2616 public void llModifyLand(int action, int brush) 2616 public void llModifyLand(int action, int brush)
2617 { 2617 {
2618 m_host.AddScriptLPS(1); 2618 m_host.AddScriptLPS(1);
2619 if (World.PermissionsMngr.CanTerraform(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0))) 2619 if (World.Permissions.CanTerraform(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0)))
2620 { 2620 {
2621 NotImplemented("llModifyLand"); 2621 NotImplemented("llModifyLand");
2622 } 2622 }
@@ -3869,7 +3869,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3869 { 3869 {
3870 if (m_host.ObjectOwner == parcel.landData.ownerID || 3870 if (m_host.ObjectOwner == parcel.landData.ownerID ||
3871 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID 3871 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID
3872 && parcel.landData.isGroupOwned) || World.PermissionsMngr.GenericEstatePermission(m_host.OwnerID)) 3872 && parcel.landData.isGroupOwned) || World.Permissions.GenericEstatePermission(m_host.OwnerID))
3873 { 3873 {
3874 av.StandUp(); 3874 av.StandUp();
3875 } 3875 }
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
index 731168d..ddca617 100644
--- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
@@ -258,7 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Common
258 if (x > 255 || x < 0 || y > 255 || y < 0) 258 if (x > 255 || x < 0 || y > 255 || y < 0)
259 LSLError("osTerrainSetHeight: Coordinate out of bounds"); 259 LSLError("osTerrainSetHeight: Coordinate out of bounds");
260 260
261 if (World.PermissionsMngr.CanTerraform(m_host.OwnerID, new LLVector3(x, y, 0))) 261 if (World.Permissions.CanTerraform(m_host.OwnerID, new LLVector3(x, y, 0)))
262 { 262 {
263 World.Heightmap[x, y] = val; 263 World.Heightmap[x, y] = val;
264 return 1; 264 return 1;
@@ -281,7 +281,7 @@ namespace OpenSim.Region.ScriptEngine.Common
281 public int osRegionRestart(double seconds) 281 public int osRegionRestart(double seconds)
282 { 282 {
283 m_host.AddScriptLPS(1); 283 m_host.AddScriptLPS(1);
284 if (World.PermissionsMngr.CanRestartSim(m_host.OwnerID)) 284 if (World.Permissions.CanRestartSim(m_host.OwnerID))
285 { 285 {
286 World.Restart((float)seconds); 286 World.Restart((float)seconds);
287 return 1; 287 return 1;
@@ -406,7 +406,7 @@ namespace OpenSim.Region.ScriptEngine.Common
406 406
407 if (config.Configs["LL-Functions"].GetBoolean("AllowosConsoleCommand", false)) 407 if (config.Configs["LL-Functions"].GetBoolean("AllowosConsoleCommand", false))
408 { 408 {
409 if (World.PermissionsMngr.CanRunConsoleCommand(m_host.OwnerID)) 409 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
410 { 410 {
411 MainConsole.Instance.RunCommand(command); 411 MainConsole.Instance.RunCommand(command);
412 return true; 412 return true;