corrade-lsl-templates – Diff between revs 5 and 29
?pathlinks?
Rev 5 | Rev 29 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | /////////////////////////////////////////////////////////////////////////// |
1 | /////////////////////////////////////////////////////////////////////////// |
|
2 | // Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3 // |
2 | // Copyright (C) Wizardry and Steamworks 2014 - License: CC BY 2.0 // |
|
3 | /////////////////////////////////////////////////////////////////////////// |
3 | /////////////////////////////////////////////////////////////////////////// |
|
4 | // |
4 | // |
|
5 | // This project makes Corrade, the Second Life / OpenSim bot track all the |
5 | // This project makes Corrade, the Second Life / OpenSim bot track all the |
|
6 | // visitors on a region and record information to the group database. More |
6 | // visitors on a region and record information to the group database. More |
|
7 | // information on the Corrade Second Life / OpenSim scripted agent can be |
7 | // information on the Corrade Second Life / OpenSim scripted agent can be |
|
Line 9... | Line 9... | |||
9 | // |
9 | // |
|
10 | // The script works in combination with a "configuration" notecard that |
10 | // The script works in combination with a "configuration" notecard that |
|
11 | // must be placed in the same primitive as this script. The purpose of this |
11 | // must be placed in the same primitive as this script. The purpose of this |
|
12 | // script is to illustrate the Corrade built-in group database features |
12 | // script is to illustrate the Corrade built-in group database features |
|
13 | // and you are free to use, change, and commercialize it under the terms |
13 | // and you are free to use, change, and commercialize it under the terms |
|
14 | // of the GNU/GPLv3 license at: http://www.gnu.org/licenses/gpl.html |
14 | // of the CC BY 2.0 license at: https://creativecommons.org/licenses/by/2.0 |
|
15 | // |
15 | // |
|
16 | /////////////////////////////////////////////////////////////////////////// |
16 | /////////////////////////////////////////////////////////////////////////// |
|
Line 17... | Line 17... | |||
17 | |
17 | |
|
18 | /////////////////////////////////////////////////////////////////////////// |
18 | /////////////////////////////////////////////////////////////////////////// |
|
19 | // Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3 // |
19 | // Copyright (C) 2014 Wizardry and Steamworks - License: CC BY 2.0 // |
|
20 | /////////////////////////////////////////////////////////////////////////// |
20 | /////////////////////////////////////////////////////////////////////////// |
|
21 | string wasKeyValueGet(string k, string data) { |
21 | string wasKeyValueGet(string k, string data) { |
|
22 | if(llStringLength(data) == 0) return ""; |
22 | if(llStringLength(data) == 0) return ""; |
|
23 | if(llStringLength(k) == 0) return ""; |
23 | if(llStringLength(k) == 0) return ""; |
|
Line 26... | Line 26... | |||
26 | if(i != -1) return llList2String(a, i+1); |
26 | if(i != -1) return llList2String(a, i+1); |
|
27 | return ""; |
27 | return ""; |
|
28 | } |
28 | } |
|
Line 29... | Line 29... | |||
29 | |
29 | |
|
30 | /////////////////////////////////////////////////////////////////////////// |
30 | /////////////////////////////////////////////////////////////////////////// |
|
31 | // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // |
31 | // Copyright (C) 2013 Wizardry and Steamworks - License: CC BY 2.0 // |
|
32 | /////////////////////////////////////////////////////////////////////////// |
32 | /////////////////////////////////////////////////////////////////////////// |
|
33 | string wasKeyValueEncode(list data) { |
33 | string wasKeyValueEncode(list data) { |
|
34 | list k = llList2ListStrided(data, 0, -1, 2); |
34 | list k = llList2ListStrided(data, 0, -1, 2); |
|
35 | list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); |
35 | list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); |
|
Line 41... | Line 41... | |||
41 | } while(llGetListLength(k) != 0); |
41 | } while(llGetListLength(k) != 0); |
|
42 | return llDumpList2String(data, "&"); |
42 | return llDumpList2String(data, "&"); |
|
43 | } |
43 | } |
|
Line 44... | Line 44... | |||
44 | |
44 | |
|
45 | /////////////////////////////////////////////////////////////////////////// |
45 | /////////////////////////////////////////////////////////////////////////// |
|
46 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
46 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
47 | /////////////////////////////////////////////////////////////////////////// |
47 | /////////////////////////////////////////////////////////////////////////// |
|
48 | // escapes a string in conformance with RFC1738 |
48 | // escapes a string in conformance with RFC1738 |
|
49 | string wasURLEscape(string i) { |
49 | string wasURLEscape(string i) { |
|
50 | string o = ""; |
50 | string o = ""; |
|
Line 65... | Line 65... | |||
65 | } while(i != ""); |
65 | } while(i != ""); |
|
66 | return o; |
66 | return o; |
|
67 | } |
67 | } |
|
Line 68... | Line 68... | |||
68 | |
68 | |
|
69 | /////////////////////////////////////////////////////////////////////////// |
69 | /////////////////////////////////////////////////////////////////////////// |
|
70 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
70 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
71 | /////////////////////////////////////////////////////////////////////////// |
71 | /////////////////////////////////////////////////////////////////////////// |
|
72 | // unescapes a string in conformance with RFC1738 |
72 | // unescapes a string in conformance with RFC1738 |
|
73 | string wasURLUnescape(string i) { |
73 | string wasURLUnescape(string i) { |
|
74 | return llUnescapeURL( |
74 | return llUnescapeURL( |
|
Line 89... | Line 89... | |||
89 | ) |
89 | ) |
|
90 | ); |
90 | ); |
|
91 | } |
91 | } |
|
Line 92... | Line 92... | |||
92 | |
92 | |
|
93 | /////////////////////////////////////////////////////////////////////////// |
93 | /////////////////////////////////////////////////////////////////////////// |
|
94 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
94 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
95 | /////////////////////////////////////////////////////////////////////////// |
95 | /////////////////////////////////////////////////////////////////////////// |
|
96 | list wasCSVToList(string csv) { |
96 | list wasCSVToList(string csv) { |
|
97 | list l = []; |
97 | list l = []; |
|
98 | list s = []; |
98 | list s = []; |