diff options
author | Justin Clark-Casey (justincc) | 2012-05-14 18:33:20 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-14 18:33:20 +0100 |
commit | 42557d7d4c145030dceb2b42bd4c0e7bd22c930d (patch) | |
tree | 289418b2630b51507b94e5b4830764c3a5b62cb4 /OpenSim/Region/CoreModules | |
parent | Add more region information to some teleport related logging (diff) | |
parent | Oops - missed the config changes (diff) | |
download | opensim-SC_OLD-42557d7d4c145030dceb2b42bd4c0e7bd22c930d.zip opensim-SC_OLD-42557d7d4c145030dceb2b42bd4c0e7bd22c930d.tar.gz opensim-SC_OLD-42557d7d4c145030dceb2b42bd4c0e7bd22c930d.tar.bz2 opensim-SC_OLD-42557d7d4c145030dceb2b42bd4c0e7bd22c930d.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs index 9255791..e91e8b9 100644 --- a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs | |||
@@ -64,6 +64,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules | |||
64 | private TimeSpan m_QueueTimeout = new TimeSpan(2, 0, 0); // 2 hours without llGetNextEmail drops the queue | 64 | private TimeSpan m_QueueTimeout = new TimeSpan(2, 0, 0); // 2 hours without llGetNextEmail drops the queue |
65 | private string m_InterObjectHostname = "lsl.opensim.local"; | 65 | private string m_InterObjectHostname = "lsl.opensim.local"; |
66 | 66 | ||
67 | private int m_MaxEmailSize = 4096; // largest email allowed by default, as per lsl docs. | ||
68 | |||
67 | // Scenes by Region Handle | 69 | // Scenes by Region Handle |
68 | private Dictionary<ulong, Scene> m_Scenes = | 70 | private Dictionary<ulong, Scene> m_Scenes = |
69 | new Dictionary<ulong, Scene>(); | 71 | new Dictionary<ulong, Scene>(); |
@@ -127,6 +129,7 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules | |||
127 | SMTP_SERVER_PORT = SMTPConfig.GetInt("SMTP_SERVER_PORT", SMTP_SERVER_PORT); | 129 | SMTP_SERVER_PORT = SMTPConfig.GetInt("SMTP_SERVER_PORT", SMTP_SERVER_PORT); |
128 | SMTP_SERVER_LOGIN = SMTPConfig.GetString("SMTP_SERVER_LOGIN", SMTP_SERVER_LOGIN); | 130 | SMTP_SERVER_LOGIN = SMTPConfig.GetString("SMTP_SERVER_LOGIN", SMTP_SERVER_LOGIN); |
129 | SMTP_SERVER_PASSWORD = SMTPConfig.GetString("SMTP_SERVER_PASSWORD", SMTP_SERVER_PASSWORD); | 131 | SMTP_SERVER_PASSWORD = SMTPConfig.GetString("SMTP_SERVER_PASSWORD", SMTP_SERVER_PASSWORD); |
132 | m_MaxEmailSize = SMTPConfig.GetInt("email_max_size", m_MaxEmailSize); | ||
130 | } | 133 | } |
131 | catch (Exception e) | 134 | catch (Exception e) |
132 | { | 135 | { |
@@ -176,18 +179,6 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules | |||
176 | get { return true; } | 179 | get { return true; } |
177 | } | 180 | } |
178 | 181 | ||
179 | /// <summary> | ||
180 | /// Delay function using thread in seconds | ||
181 | /// </summary> | ||
182 | /// <param name="seconds"></param> | ||
183 | private void DelayInSeconds(int delay) | ||
184 | { | ||
185 | delay = (int)((float)delay * 1000); | ||
186 | if (delay == 0) | ||
187 | return; | ||
188 | System.Threading.Thread.Sleep(delay); | ||
189 | } | ||
190 | |||
191 | private bool IsLocal(UUID objectID) | 182 | private bool IsLocal(UUID objectID) |
192 | { | 183 | { |
193 | string unused; | 184 | string unused; |
@@ -267,10 +258,9 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules | |||
267 | m_log.Error("[EMAIL] REGEX Problem in EMail Address: "+address); | 258 | m_log.Error("[EMAIL] REGEX Problem in EMail Address: "+address); |
268 | return; | 259 | return; |
269 | } | 260 | } |
270 | //FIXME:Check if subject + body = 4096 Byte | 261 | if ((subject.Length + body.Length) > m_MaxEmailSize) |
271 | if ((subject.Length + body.Length) > 1024) | ||
272 | { | 262 | { |
273 | m_log.Error("[EMAIL] subject + body > 1024 Byte"); | 263 | m_log.Error("[EMAIL] subject + body larger than limit of " + m_MaxEmailSize + " bytes"); |
274 | return; | 264 | return; |
275 | } | 265 | } |
276 | 266 | ||
@@ -345,10 +335,6 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules | |||
345 | // TODO FIX | 335 | // TODO FIX |
346 | } | 336 | } |
347 | } | 337 | } |
348 | |||
349 | //DONE: Message as Second Life style | ||
350 | //20 second delay - AntiSpam System - for now only 10 seconds | ||
351 | DelayInSeconds(10); | ||
352 | } | 338 | } |
353 | 339 | ||
354 | /// <summary> | 340 | /// <summary> |