mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
Adding check permission CanIssueEstateCommand for osRegionNotice and new function osRegionNotice(string agentID, string msg)
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
This commit is contained in:
committed by
UbitUmarov
parent
7120ffbc08
commit
99a23421a8
@@ -628,16 +628,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void osRegionNotice(string msg)
|
||||
{
|
||||
// This implementation provides absolutely no security
|
||||
// It's high griefing potential makes this classification
|
||||
// necessary
|
||||
//
|
||||
CheckThreatLevel(ThreatLevel.VeryHigh, "osRegionNotice");
|
||||
CheckThreatLevel(ThreatLevel.High, "osRegionNotice");
|
||||
|
||||
IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
|
||||
if (dm == null)
|
||||
return;
|
||||
|
||||
if (dm != null)
|
||||
dm.SendGeneralAlert(msg);
|
||||
if (!World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false))
|
||||
return;
|
||||
|
||||
dm.SendGeneralAlert(msg + "\n");
|
||||
}
|
||||
|
||||
public void osRegionNotice(string agentID, string msg)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osRegionNotice");
|
||||
|
||||
if (!UUID.TryParse(agentID, out UUID avatarID))
|
||||
return;
|
||||
|
||||
if (!World.TryGetScenePresence(avatarID, out ScenePresence sp))
|
||||
return;
|
||||
|
||||
if (sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC)
|
||||
return;
|
||||
|
||||
IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
|
||||
if (dm == null)
|
||||
return;
|
||||
|
||||
if (!World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false))
|
||||
return;
|
||||
|
||||
dm.SendAlertToUser(sp.ControllingClient, msg + "\n", false);
|
||||
}
|
||||
|
||||
public void osSetRot(UUID target, Quaternion rotation)
|
||||
|
||||
@@ -138,6 +138,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
int osRegionRestart(double seconds);
|
||||
int osRegionRestart(double seconds, string msg);
|
||||
void osRegionNotice(string msg);
|
||||
void osRegionNotice(string agentID, string msg);
|
||||
bool osConsoleCommand(string Command);
|
||||
void osSetParcelMediaURL(string url);
|
||||
void osSetPrimFloatOnWater(int floatYN);
|
||||
|
||||
@@ -225,6 +225,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_OSSL_Functions.osRegionNotice(msg);
|
||||
}
|
||||
|
||||
public void osRegionNotice(string agentID, string msg)
|
||||
{
|
||||
m_OSSL_Functions.osRegionNotice(agentID, msg);
|
||||
}
|
||||
|
||||
public bool osConsoleCommand(string Command)
|
||||
{
|
||||
return m_OSSL_Functions.osConsoleCommand(Command);
|
||||
|
||||
Reference in New Issue
Block a user