aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorMelanie2012-05-14 23:32:49 +0100
committerMelanie2012-05-14 23:32:49 +0100
commit6126b6da72bc0d3265df1ec45901f10737173d9a (patch)
tree2e645853cccef8591738a59a8b76bb14a0d2fb0b /OpenSim/Region/ScriptEngine/Shared/Api
parentMerge branch 'avination' into careminster (diff)
parentSave the Telehub and its Spawn Points in the OAR (diff)
downloadopensim-SC-6126b6da72bc0d3265df1ec45901f10737173d9a.zip
opensim-SC-6126b6da72bc0d3265df1ec45901f10737173d9a.tar.gz
opensim-SC-6126b6da72bc0d3265df1ec45901f10737173d9a.tar.bz2
opensim-SC-6126b6da72bc0d3265df1ec45901f10737173d9a.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs28
1 files changed, 21 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5bd781c..8c4ee41 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -111,6 +111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
111 protected IUrlModule m_UrlModule = null; 111 protected IUrlModule m_UrlModule = null;
112 protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache = 112 protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache =
113 new Dictionary<UUID, UserInfoCacheEntry>(); 113 new Dictionary<UUID, UserInfoCacheEntry>();
114 protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp.
114 115
115 protected Timer m_ShoutSayTimer; 116 protected Timer m_ShoutSayTimer;
116 protected int m_SayShoutCount = 0; 117 protected int m_SayShoutCount = 0;
@@ -127,6 +128,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
127 m_item = item; 128 m_item = item;
128 m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false); 129 m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false);
129 130
131 LoadLimits(); // read script limits from config.
132
133 m_TransferModule =
134 m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
135 m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
136
137 AsyncCommands = new AsyncCommandManager(ScriptEngine);
138 }
139
140 /* load configuration items that affect script, object and run-time behavior. */
141 private void LoadLimits()
142 {
130 m_ScriptDelayFactor = 143 m_ScriptDelayFactor =
131 m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); 144 m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f);
132 m_ScriptDistanceFactor = 145 m_ScriptDistanceFactor =
@@ -139,12 +152,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
139 m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255); 152 m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255);
140 if (m_notecardLineReadCharsMax > 65535) 153 if (m_notecardLineReadCharsMax > 65535)
141 m_notecardLineReadCharsMax = 65535; 154 m_notecardLineReadCharsMax = 65535;
142 155 // load limits for particular subsystems.
143 m_TransferModule = 156 IConfig SMTPConfig;
144 m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>(); 157 if ((SMTPConfig = m_ScriptEngine.ConfigSource.Configs["SMTP"]) != null) {
145 m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>(); 158 // there's an smtp config, so load in the snooze time.
146 159 EMAIL_PAUSE_TIME = SMTPConfig.GetInt("email_pause_time", EMAIL_PAUSE_TIME);
147 AsyncCommands = new AsyncCommandManager(ScriptEngine); 160 }
148 } 161 }
149 162
150 public override Object InitializeLifetimeService() 163 public override Object InitializeLifetimeService()
@@ -3127,6 +3140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3127 3140
3128 public virtual void llSleep(double sec) 3141 public virtual void llSleep(double sec)
3129 { 3142 {
3143// m_log.Info("llSleep snoozing " + sec + "s.");
3130 m_host.AddScriptLPS(1); 3144 m_host.AddScriptLPS(1);
3131 Thread.Sleep((int)(sec * 1000)); 3145 Thread.Sleep((int)(sec * 1000));
3132 } 3146 }
@@ -3413,7 +3427,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3413 } 3427 }
3414 3428
3415 emailModule.SendEmail(m_host.UUID, address, subject, message); 3429 emailModule.SendEmail(m_host.UUID, address, subject, message);
3416 ScriptSleep(15000); 3430 ScriptSleep(EMAIL_PAUSE_TIME * 1000);
3417 } 3431 }
3418 3432
3419 public void llGetNextEmail(string address, string subject) 3433 public void llGetNextEmail(string address, string subject)