diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1579233..7887515 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2042,13 +2042,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2042 | public void llEmail(string address, string subject, string message) | 2042 | public void llEmail(string address, string subject, string message) |
2043 | { | 2043 | { |
2044 | m_host.AddScriptLPS(1); | 2044 | m_host.AddScriptLPS(1); |
2045 | NotImplemented("llEmail"); | 2045 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); |
2046 | if(emailModule == null) | ||
2047 | return; | ||
2048 | |||
2049 | emailModule.SendEmail(m_host.UUID, address, subject, message); | ||
2046 | } | 2050 | } |
2047 | 2051 | ||
2048 | public void llGetNextEmail(string address, string subject) | 2052 | public void llGetNextEmail(string address, string subject) |
2049 | { | 2053 | { |
2050 | m_host.AddScriptLPS(1); | 2054 | m_host.AddScriptLPS(1); |
2051 | NotImplemented("llGetNextEmail"); | 2055 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); |
2056 | if(emailModule == null) | ||
2057 | return; | ||
2058 | Email email; | ||
2059 | |||
2060 | email = emailModule.GetNextEmail(m_host.UUID, address, subject); | ||
2061 | |||
2062 | if(email == null) | ||
2063 | return; | ||
2064 | |||
2065 | m_ScriptEngine.PostObjectEvent(m_host.LocalId, | ||
2066 | new EventParams("email", | ||
2067 | new Object[] { | ||
2068 | new LSL_Types.LSLString(email.time), | ||
2069 | new LSL_Types.LSLString(email.sender), | ||
2070 | new LSL_Types.LSLString(email.subject), | ||
2071 | new LSL_Types.LSLString(email.message), | ||
2072 | new LSL_Types.LSLInteger(email.numLeft)}, | ||
2073 | new DetectParams[0])); | ||
2074 | |||
2052 | } | 2075 | } |
2053 | 2076 | ||
2054 | public string llGetKey() | 2077 | public string llGetKey() |