aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorOren Hurvitz2012-04-23 19:18:28 +0300
committerJustin Clark-Casey (justincc)2012-04-26 22:53:13 +0100
commit8a65f5a70dea70073790c15ba2ae7739771f74b5 (patch)
tree6f05e636b77968797f59041027db6ec923e9ce67 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentRefactored how asset/inventory types are associated with content types: gathe... (diff)
downloadopensim-SC_OLD-8a65f5a70dea70073790c15ba2ae7739771f74b5.zip
opensim-SC_OLD-8a65f5a70dea70073790c15ba2ae7739771f74b5.tar.gz
opensim-SC_OLD-8a65f5a70dea70073790c15ba2ae7739771f74b5.tar.bz2
opensim-SC_OLD-8a65f5a70dea70073790c15ba2ae7739771f74b5.tar.xz
OSSL: Removed check for CanRunConsoleCommand() in osKickAvatar.
OSSL permissions are now controlled in OpenSim.ini.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs25
1 files changed, 12 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 893fda1..0d4ea19 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -351,7 +351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
351 351
352 UUID ownerID = ti.OwnerID; 352 UUID ownerID = ti.OwnerID;
353 353
354 //OSSL only may be used if objet is in the same group as the parcel 354 //OSSL only may be used if object is in the same group as the parcel
355 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("PARCEL_GROUP_MEMBER")) 355 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("PARCEL_GROUP_MEMBER"))
356 { 356 {
357 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 357 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
@@ -729,11 +729,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
729 729
730 m_host.AddScriptLPS(1); 730 m_host.AddScriptLPS(1);
731 731
732 // For safety, we add another permission check here, and don't rely only on the standard OSSL permissions
732 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) 733 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
733 { 734 {
734 MainConsole.Instance.RunCommand(command); 735 MainConsole.Instance.RunCommand(command);
735 return true; 736 return true;
736 } 737 }
738
737 return false; 739 return false;
738 } 740 }
739 741
@@ -2825,21 +2827,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2825 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); 2827 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
2826 m_host.AddScriptLPS(1); 2828 m_host.AddScriptLPS(1);
2827 2829
2828 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) 2830 World.ForEachRootScenePresence(delegate(ScenePresence sp)
2829 { 2831 {
2830 World.ForEachRootScenePresence(delegate(ScenePresence sp) 2832 if (sp.Firstname == FirstName && sp.Lastname == SurName)
2831 { 2833 {
2832 if (sp.Firstname == FirstName && sp.Lastname == SurName) 2834 // kick client...
2833 { 2835 if (alert != null)
2834 // kick client... 2836 sp.ControllingClient.Kick(alert);
2835 if (alert != null)
2836 sp.ControllingClient.Kick(alert);
2837 2837
2838 // ...and close on our side 2838 // ...and close on our side
2839 sp.Scene.IncomingCloseAgent(sp.UUID); 2839 sp.Scene.IncomingCloseAgent(sp.UUID);
2840 } 2840 }
2841 }); 2841 });
2842 }
2843 } 2842 }
2844 2843
2845 public void osCauseDamage(string avatar, double damage) 2844 public void osCauseDamage(string avatar, double damage)