Thank you Hashbox for adding the

osConsoleCommand Feature to ll-functions.
ThreadPoolClientBranch
Charles Krinke 2008-02-17 21:15:43 +00:00
parent c2d7beb617
commit e6a74344e7
4 changed files with 20 additions and 4 deletions

View File

@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment
m_scene.EventManager.TriggerPermissionError(user, reason);
}
protected virtual bool IsAdministrator(LLUUID user)
public virtual bool IsAdministrator(LLUUID user)
{
if (m_bypassPermissions)
{

View File

@ -1865,6 +1865,11 @@ namespace OpenSim.Region.ScriptEngine.Common
m_LSL_Functions.osRegionNotice(msg);
}
public int osConsoleCommand(string Command)
{
return m_LSL_Functions.osConsoleCommand(Command);
}
public double llList2Float(LSL_Types.list src, int index)
{
return m_LSL_Functions.llList2Float(src, index);

View File

@ -3676,6 +3676,16 @@ namespace OpenSim.Region.ScriptEngine.Common
return LLUUID.Zero.ToString();
}
public int osConsoleCommand(string Command)
{
if (World.PermissionsMngr.IsAdministrator(m_host.OwnerID)) {
OpenSim.Framework.Console.MainConsole.Instance.RunCommand(Command);
return 1;
} else {
return 0;
}
}
private void NotImplemented(string Command)
{
m_host.AddScriptLPS(1);

View File

@ -641,5 +641,6 @@ namespace OpenSim.Region.ScriptEngine.Common
int osTerrainSetHeight(int x, int y, double val);
int osRegionRestart(double seconds);
void osRegionNotice(string msg);
int osConsoleCommand(string Command);
}
}