mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Region/Framework/Scenes/Scene.Inventory.cs OpenSim/Region/Framework/Scenes/Scene.cs
This commit is contained in:
@@ -360,7 +360,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
UUID ownerID = ti.OwnerID;
|
||||
|
||||
//OSSL only may be used if objet is in the same group as the parcel
|
||||
//OSSL only may be used if object is in the same group as the parcel
|
||||
if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("PARCEL_GROUP_MEMBER"))
|
||||
{
|
||||
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
|
||||
@@ -738,11 +738,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
// For safety, we add another permission check here, and don't rely only on the standard OSSL permissions
|
||||
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
|
||||
{
|
||||
MainConsole.Instance.RunCommand(command);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2568,6 +2570,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
public void osNpcSay(LSL_Key npc, string message)
|
||||
{
|
||||
osNpcSay(npc, 0, message);
|
||||
}
|
||||
|
||||
public void osNpcSay(LSL_Key npc, int channel, string message)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osNpcSay");
|
||||
m_host.AddScriptLPS(1);
|
||||
@@ -2580,7 +2587,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
||||
return;
|
||||
|
||||
module.Say(npcId, World, message);
|
||||
module.Say(npcId, World, message, channel);
|
||||
}
|
||||
}
|
||||
|
||||
public void osNpcShout(LSL_Key npc, int channel, string message)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osNpcShout");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
||||
if (module != null)
|
||||
{
|
||||
UUID npcId = new UUID(npc.m_string);
|
||||
|
||||
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
||||
return;
|
||||
|
||||
module.Shout(npcId, World, message, channel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2681,6 +2705,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
public void osNpcWhisper(LSL_Key npc, int channel, string message)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osNpcWhisper");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
||||
if (module != null)
|
||||
{
|
||||
UUID npcId = new UUID(npc.m_string);
|
||||
|
||||
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
||||
return;
|
||||
|
||||
module.Whisper(npcId, World, message, channel);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save the current appearance of the script owner permanently to the named notecard.
|
||||
/// </summary>
|
||||
@@ -2832,21 +2873,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
|
||||
World.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||
{
|
||||
World.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||
if (sp.Firstname == FirstName && sp.Lastname == SurName)
|
||||
{
|
||||
if (sp.Firstname == FirstName && sp.Lastname == SurName)
|
||||
{
|
||||
// kick client...
|
||||
if (alert != null)
|
||||
sp.ControllingClient.Kick(alert);
|
||||
// kick client...
|
||||
if (alert != null)
|
||||
sp.ControllingClient.Kick(alert);
|
||||
|
||||
// ...and close on our side
|
||||
sp.Scene.IncomingCloseAgent(sp.UUID);
|
||||
}
|
||||
});
|
||||
}
|
||||
// ...and close on our side
|
||||
sp.Scene.IncomingCloseAgent(sp.UUID);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void osCauseDamage(string avatar, double damage)
|
||||
|
||||
Reference in New Issue
Block a user