mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
This commit is contained in:
@@ -111,6 +111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
protected IUrlModule m_UrlModule = null;
|
||||
protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache =
|
||||
new Dictionary<UUID, UserInfoCacheEntry>();
|
||||
protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp.
|
||||
|
||||
protected Timer m_ShoutSayTimer;
|
||||
protected int m_SayShoutCount = 0;
|
||||
@@ -127,6 +128,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_item = item;
|
||||
m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false);
|
||||
|
||||
LoadLimits(); // read script limits from config.
|
||||
|
||||
m_TransferModule =
|
||||
m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
|
||||
m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
|
||||
|
||||
AsyncCommands = new AsyncCommandManager(ScriptEngine);
|
||||
}
|
||||
|
||||
/* load configuration items that affect script, object and run-time behavior. */
|
||||
private void LoadLimits()
|
||||
{
|
||||
m_ScriptDelayFactor =
|
||||
m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f);
|
||||
m_ScriptDistanceFactor =
|
||||
@@ -139,12 +152,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255);
|
||||
if (m_notecardLineReadCharsMax > 65535)
|
||||
m_notecardLineReadCharsMax = 65535;
|
||||
|
||||
m_TransferModule =
|
||||
m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
|
||||
m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
|
||||
|
||||
AsyncCommands = new AsyncCommandManager(ScriptEngine);
|
||||
// load limits for particular subsystems.
|
||||
IConfig SMTPConfig;
|
||||
if ((SMTPConfig = m_ScriptEngine.ConfigSource.Configs["SMTP"]) != null) {
|
||||
// there's an smtp config, so load in the snooze time.
|
||||
EMAIL_PAUSE_TIME = SMTPConfig.GetInt("email_pause_time", EMAIL_PAUSE_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
public override Object InitializeLifetimeService()
|
||||
@@ -3127,6 +3140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public virtual void llSleep(double sec)
|
||||
{
|
||||
// m_log.Info("llSleep snoozing " + sec + "s.");
|
||||
m_host.AddScriptLPS(1);
|
||||
Thread.Sleep((int)(sec * 1000));
|
||||
}
|
||||
@@ -3413,7 +3427,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
emailModule.SendEmail(m_host.UUID, address, subject, message);
|
||||
ScriptSleep(15000);
|
||||
ScriptSleep(EMAIL_PAUSE_TIME * 1000);
|
||||
}
|
||||
|
||||
public void llGetNextEmail(string address, string subject)
|
||||
|
||||
Reference in New Issue
Block a user