removed useless _ folders

This commit is contained in:
Fred Beckhusen
2015-08-09 16:54:31 -05:00
parent fde850293c
commit 948a44dfba
5204 changed files with 2425579 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
<Solution name="Email_Module">
<Project name="Email_Module" path="Email_Module\Email_Module.prj" active="true"/>
</Solution>

View File

@@ -0,0 +1,10 @@
<Project name="Email_Module" guid="D7F12C67-6C00-1014-B904-200204C60A89">
<Object name="Object" guid="D7F12D54-6C00-1014-B904-200204C60A89">
<Script name="Email_Module_1.lsl" guid="D7F16762-6C00-1014-B904-200204C60A89">
</Script>
<Script name="Email_Module_2.lsl" guid="D7F1845A-6C00-1014-B904-200204C60A89">
</Script>
<Script name="Email_Module_3.lsl" guid="D7F1A045-6C00-1014-B904-200204C60A89">
</Script>
</Object>
</Project>

View File

@@ -0,0 +1,160 @@
// :CATEGORY:Email
// :NAME:Email_Module
// :AUTHOR:Christopher Omega
// :CREATED:2010-01-10 05:20:56.000
// :EDITED:2013-09-18 15:38:52
// :ID:279
// :NUM:372
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// The script
// :CODE:
// In order to preserve the integrity of the sent data, a seperater
// (declared below as a global constant) is prepended the message before it is sent.
// This is so programs can easily discard the additional data Linden Lab's email
// server prepends to the message passed to llEmail.
// The suffix added to an object's UUID to send an email
// to it via llEmail.
string OBJECT_EMAIL_SUFFIX = "@lsl.secondlife.com";
// Specifies the amount of time between object email polls.
float EMAIL_POLL_INTERVAL = 5.0;
// Seperator between crap LL prepends to llEmail-sent messages and the real message.
string REAL_DATA_SEPERATOR = "#_|#|_#";
// Name of llEmail-calling worker object.
string EMAIL_OBJECT_NAME = "email";
// ========== For method invocation ==========
string randomSeperator(integer len) {
integer firstChar = (integer)llFrand(60) + 20; // Range of printable chars = 0x20 to 0x7E
if (len <= 1)
return llUnescapeURL("%"+(string)firstChar);
integer lastChar;
do { // Last char must not equal first char.
lastChar = (integer)llFrand(60) + 20;
} while (lastChar == firstChar);
string ret = llUnescapeURL("%"+(string)firstChar);
for (len -= 2; len > 0; --len)
ret += llUnescapeURL("%" + (string)((integer)llFrand(60) + 20));
return ret + llUnescapeURL("%"+(string)lastChar);
}
string listToString(list src) {
string chars = (string) src; // Squashes all elements together.
string seperator;
do { // Find a seperator that's not in the list's string form
seperator = randomSeperator(3); // so we dont kill data.
} while (llSubStringIndex(chars, seperator) != -1);
return seperator + llDumpList2String(src, seperator);
}
list stringToList(string src) { // First 3 chars is seperator.
return llParseStringKeepNulls(llDeleteSubString(src, 0, 2),
[llGetSubString(src, 0, 2)], []);
}
callMethod(integer identifyer, string methodName, list parameters) {
llMessageLinked(LINK_THIS, identifyer, // ID only necessary for return value.
listToString(parameters), methodName);
}
returnValue(integer identifyer, string methodName, list value) {
callMethod(identifyer, methodName + "_ret", value);
}
// =============================================
// Events triggered by this module:
m_receivedEmailData(string timestamp, string senderAddress, string senderSubject, string senderMessage) {
callMethod(0, "receivedEmailData", [timestamp, senderAddress, senderSubject, senderMessage]);
}
m_moduleReset(string moduleName) {
callMethod(0, "moduleReset", [moduleName]);
}
// Methods called:
m_chat(integer channel, string message) {
callMethod(0, "chat", [channel, message]);
}
sendEmail(string address, string subject, string message) {
if (llGetInventoryType(EMAIL_OBJECT_NAME) != INVENTORY_NONE) {

View File

@@ -0,0 +1,110 @@
// :CATEGORY:Email
// :NAME:Email_Module
// :AUTHOR:Christopher Omega
// :CREATED:2010-01-10 05:20:56.000
// :EDITED:2013-09-18 15:38:52
// :ID:279
// :NUM:373
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// To use this module, copy and paste the above into a script and name it "EmailModule". The script requires ChatCodec in the same object's inventory. To send emails, an object named "email" must be in the same object's inventory as EmailModule. The object named "email" must also contain ChatCodec and the script below:
// :CODE:
// Copyright (c) 2006 Francisco V. Saldana (Christopher Omega)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
// Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Deligates llEmail-calling duties, so EmailModule doesn't need to incur the 20-second delay.
// Requires ChatCodec.
// ========== For method invocation ==========
string randomSeperator(integer len) {
integer firstChar = (integer)llFrand(60) + 20; // Range of printable chars = 0x20 to 0x7E
if (len <= 1)
return llUnescapeURL("%"+(string)firstChar);
integer lastChar;
do { // Last char must not equal first char.
lastChar = (integer)llFrand(60) + 20;
} while (lastChar == firstChar);
string ret = llUnescapeURL("%"+(string)firstChar);
for (len -= 2; len > 0; --len)
ret += llUnescapeURL("%" + (string)((integer)llFrand(60) + 20));
return ret + llUnescapeURL("%"+(string)lastChar);
}
string listToString(list src) {
string chars = (string) src; // Squashes all elements together.
string seperator;
do { // Find a seperator that's not in the list's string form
seperator = randomSeperator(3); // so we dont kill data.
} while (llSubStringIndex(chars, seperator) != -1);
return seperator + llDumpList2String(src, seperator);
}
list stringToList(string src) { // First 3 chars is seperator.
return llParseStringKeepNulls(llDeleteSubString(src, 0, 2),
[llGetSubString(src, 0, 2)], []);

View File

@@ -0,0 +1,80 @@
// :CATEGORY:Email
// :NAME:Email_Module
// :AUTHOR:Christopher Omega
// :CREATED:2010-01-10 05:20:56.000
// :EDITED:2013-09-18 15:38:52
// :ID:279
// :NUM:374
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
//
// Here's an example script that utilizes this module:
// :CODE:
// ========== For method invocation ==========
string randomSeperator(integer len) {
integer firstChar = (integer)llFrand(60) + 20; // Range of printable chars = 0x20 to 0x7E
if (len <= 1)
return llUnescapeURL("%"+(string)firstChar);
integer lastChar;
do { // Last char must not equal first char.
lastChar = (integer)llFrand(60) + 20;
} while (lastChar == firstChar);
string ret = llUnescapeURL("%"+(string)firstChar);
for (len -= 2; len > 0; --len)
ret += llUnescapeURL("%" + (string)((integer)llFrand(60) + 20));
return ret + llUnescapeURL("%"+(string)lastChar);
}
string listToString(list src) {
string chars = (string) src; // Squashes all elements together.
string seperator;
do { // Find a seperator that's not in the list's string form
seperator = randomSeperator(3); // so we dont kill data.
} while (llSubStringIndex(chars, seperator) != -1);
return seperator + llDumpList2String(src, seperator);
}
list stringToList(string src) { // First 3 chars is seperator.
return llParseStringKeepNulls(llDeleteSubString(src, 0, 2),
[llGetSubString(src, 0, 2)], []);
}
callMethod(integer identifyer, string methodName, list parameters) {
llMessageLinked(LINK_THIS, identifyer, // ID only necessary for return value.
listToString(parameters), methodName);
}