aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorCharles Krinke2008-07-03 20:58:29 +0000
committerCharles Krinke2008-07-03 20:58:29 +0000
commitb1ab680a66a3a6bdcf4976a342cc28412f6e2b2d (patch)
tree1c6d0c65707185dd0bf63b59433de2fc411216cf /OpenSim/Region/ScriptEngine/Shared/Api
parentadd 3 migrations, 1 each for prims, primshapes, and primitems (diff)
downloadopensim-SC_OLD-b1ab680a66a3a6bdcf4976a342cc28412f6e2b2d.zip
opensim-SC_OLD-b1ab680a66a3a6bdcf4976a342cc28412f6e2b2d.tar.gz
opensim-SC_OLD-b1ab680a66a3a6bdcf4976a342cc28412f6e2b2d.tar.bz2
opensim-SC_OLD-b1ab680a66a3a6bdcf4976a342cc28412f6e2b2d.tar.xz
Mantis#1658. Thank you, Melanie for a patch that:
Adds IEmailModule and a module skelaton
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs27
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()