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 2016 - License: GNU GPLv3 // |
2 | // Copyright (C) Wizardry and Steamworks 2016 - License: CC BY 2.0 // |
|
3 | /////////////////////////////////////////////////////////////////////////// |
3 | /////////////////////////////////////////////////////////////////////////// |
|
4 | // |
4 | // |
|
5 | // This button will send Corrade home to its set home location. |
5 | // This button will send Corrade home to its set home location. |
|
6 | // |
6 | // |
|
7 | // For more information on Corrade, please see: |
7 | // For more information on Corrade, please see: |
|
8 | // http://grimore.org/secondlife/scripted_agents/corrade |
8 | // http://grimore.org/secondlife/scripted_agents/corrade |
|
9 | // |
9 | // |
|
10 | /////////////////////////////////////////////////////////////////////////// |
10 | /////////////////////////////////////////////////////////////////////////// |
|
Line 11... | Line 11... | |||
11 | |
11 | |
|
12 | /////////////////////////////////////////////////////////////////////////// |
12 | /////////////////////////////////////////////////////////////////////////// |
|
13 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
13 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
14 | /////////////////////////////////////////////////////////////////////////// |
14 | /////////////////////////////////////////////////////////////////////////// |
|
15 | string wasKeyValueGet(string k, string data) { |
15 | string wasKeyValueGet(string k, string data) { |
|
16 | if(llStringLength(data) == 0) return ""; |
16 | if(llStringLength(data) == 0) return ""; |
|
17 | if(llStringLength(k) == 0) return ""; |
17 | if(llStringLength(k) == 0) return ""; |
|
Line 20... | Line 20... | |||
20 | if(i != -1) return llList2String(a, 2*i+1); |
20 | if(i != -1) return llList2String(a, 2*i+1); |
|
21 | return ""; |
21 | return ""; |
|
22 | } |
22 | } |
|
Line 23... | Line 23... | |||
23 | |
23 | |
|
24 | /////////////////////////////////////////////////////////////////////////// |
24 | /////////////////////////////////////////////////////////////////////////// |
|
25 | // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // |
25 | // Copyright (C) 2013 Wizardry and Steamworks - License: CC BY 2.0 // |
|
26 | /////////////////////////////////////////////////////////////////////////// |
26 | /////////////////////////////////////////////////////////////////////////// |
|
27 | string wasKeyValueEncode(list data) { |
27 | string wasKeyValueEncode(list data) { |
|
28 | list k = llList2ListStrided(data, 0, -1, 2); |
28 | list k = llList2ListStrided(data, 0, -1, 2); |
|
29 | list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); |
29 | list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); |
|
Line 35... | Line 35... | |||
35 | } while(llGetListLength(k) != 0); |
35 | } while(llGetListLength(k) != 0); |
|
36 | return llDumpList2String(data, "&"); |
36 | return llDumpList2String(data, "&"); |
|
37 | } |
37 | } |
|
Line 38... | Line 38... | |||
38 | |
38 | |
|
39 | /////////////////////////////////////////////////////////////////////////// |
39 | /////////////////////////////////////////////////////////////////////////// |
|
40 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
40 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
41 | /////////////////////////////////////////////////////////////////////////// |
41 | /////////////////////////////////////////////////////////////////////////// |
|
42 | // escapes a string in conformance with RFC1738 |
42 | // escapes a string in conformance with RFC1738 |
|
43 | string wasURLEscape(string i) { |
43 | string wasURLEscape(string i) { |
|
44 | string o = ""; |
44 | string o = ""; |
|
Line 59... | Line 59... | |||
59 | } while(i != ""); |
59 | } while(i != ""); |
|
60 | return o; |
60 | return o; |
|
61 | } |
61 | } |
|
Line 62... | Line 62... | |||
62 | |
62 | |
|
63 | /////////////////////////////////////////////////////////////////////////// |
63 | /////////////////////////////////////////////////////////////////////////// |
|
64 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
64 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
65 | /////////////////////////////////////////////////////////////////////////// |
65 | /////////////////////////////////////////////////////////////////////////// |
|
66 | list wasCSVToList(string csv) { |
66 | list wasCSVToList(string csv) { |
|
67 | list l = []; |
67 | list l = []; |
|
68 | list s = []; |
68 | list s = []; |
|
Line 98... | Line 98... | |||
98 | // postcondition: length(s) = 0 |
98 | // postcondition: length(s) = 0 |
|
99 | return l + m; |
99 | return l + m; |
|
100 | } |
100 | } |
|
Line 101... | Line 101... | |||
101 | |
101 | |
|
102 | /////////////////////////////////////////////////////////////////////////// |
102 | /////////////////////////////////////////////////////////////////////////// |
|
103 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
103 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
104 | /////////////////////////////////////////////////////////////////////////// |
104 | /////////////////////////////////////////////////////////////////////////// |
|
105 | // unescapes a string in conformance with RFC1738 |
105 | // unescapes a string in conformance with RFC1738 |
|
106 | string wasURLUnescape(string i) { |
106 | string wasURLUnescape(string i) { |
|
107 | return llUnescapeURL( |
107 | return llUnescapeURL( |