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 script is a passthrough or proxy script for script permissions that |
5 | // This script is a passthrough or proxy script for script permissions that |
|
6 | // are received by Corrade. The script binds to Corrade's permission |
6 | // are received by Corrade. The script binds to Corrade's permission |
|
7 | // notification and then any permission request received by Corrade gets |
7 | // notification and then any permission request received by Corrade gets |
|
Line 12... | Line 12... | |||
12 | // http://grimore.org/secondlife/scripted_agents/corrade |
12 | // http://grimore.org/secondlife/scripted_agents/corrade |
|
13 | // |
13 | // |
|
14 | /////////////////////////////////////////////////////////////////////////// |
14 | /////////////////////////////////////////////////////////////////////////// |
|
Line 15... | Line 15... | |||
15 | |
15 | |
|
16 | /////////////////////////////////////////////////////////////////////////// |
16 | /////////////////////////////////////////////////////////////////////////// |
|
17 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
17 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
18 | /////////////////////////////////////////////////////////////////////////// |
18 | /////////////////////////////////////////////////////////////////////////// |
|
19 | string wasKeyValueGet(string k, string data) { |
19 | string wasKeyValueGet(string k, string data) { |
|
20 | if(llStringLength(data) == 0) return ""; |
20 | if(llStringLength(data) == 0) return ""; |
|
21 | if(llStringLength(k) == 0) return ""; |
21 | if(llStringLength(k) == 0) return ""; |
|
Line 24... | Line 24... | |||
24 | if(i != -1) return llList2String(a, 2*i+1); |
24 | if(i != -1) return llList2String(a, 2*i+1); |
|
25 | return ""; |
25 | return ""; |
|
26 | } |
26 | } |
|
Line 27... | Line 27... | |||
27 | |
27 | |
|
28 | /////////////////////////////////////////////////////////////////////////// |
28 | /////////////////////////////////////////////////////////////////////////// |
|
29 | // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // |
29 | // Copyright (C) 2013 Wizardry and Steamworks - License: CC BY 2.0 // |
|
30 | /////////////////////////////////////////////////////////////////////////// |
30 | /////////////////////////////////////////////////////////////////////////// |
|
31 | string wasKeyValueEncode(list data) { |
31 | string wasKeyValueEncode(list data) { |
|
32 | list k = llList2ListStrided(data, 0, -1, 2); |
32 | list k = llList2ListStrided(data, 0, -1, 2); |
|
33 | list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); |
33 | list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); |
|
Line 39... | Line 39... | |||
39 | } while(llGetListLength(k) != 0); |
39 | } while(llGetListLength(k) != 0); |
|
40 | return llDumpList2String(data, "&"); |
40 | return llDumpList2String(data, "&"); |
|
41 | } |
41 | } |
|
Line 42... | Line 42... | |||
42 | |
42 | |
|
43 | /////////////////////////////////////////////////////////////////////////// |
43 | /////////////////////////////////////////////////////////////////////////// |
|
44 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
44 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
45 | /////////////////////////////////////////////////////////////////////////// |
45 | /////////////////////////////////////////////////////////////////////////// |
|
46 | // escapes a string in conformance with RFC1738 |
46 | // escapes a string in conformance with RFC1738 |
|
47 | string wasURLEscape(string i) { |
47 | string wasURLEscape(string i) { |
|
48 | string o = ""; |
48 | string o = ""; |
|
Line 63... | Line 63... | |||
63 | } while(i != ""); |
63 | } while(i != ""); |
|
64 | return o; |
64 | return o; |
|
65 | } |
65 | } |
|
Line 66... | Line 66... | |||
66 | |
66 | |
|
67 | /////////////////////////////////////////////////////////////////////////// |
67 | /////////////////////////////////////////////////////////////////////////// |
|
68 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
68 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
69 | /////////////////////////////////////////////////////////////////////////// |
69 | /////////////////////////////////////////////////////////////////////////// |
|
70 | list wasCSVToList(string csv) { |
70 | list wasCSVToList(string csv) { |
|
71 | list l = []; |
71 | list l = []; |
|
72 | list s = []; |
72 | list s = []; |
|
Line 102... | Line 102... | |||
102 | // postcondition: length(s) = 0 |
102 | // postcondition: length(s) = 0 |
|
103 | return l + m; |
103 | return l + m; |
|
104 | } |
104 | } |
|
Line 105... | Line 105... | |||
105 | |
105 | |
|
106 | /////////////////////////////////////////////////////////////////////////// |
106 | /////////////////////////////////////////////////////////////////////////// |
|
107 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
107 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
108 | /////////////////////////////////////////////////////////////////////////// |
108 | /////////////////////////////////////////////////////////////////////////// |
|
109 | string wasListToCSV(list l) { |
109 | string wasListToCSV(list l) { |
|
110 | list v = []; |
110 | list v = []; |
|
111 | do { |
111 | do { |
|
Line 131... | Line 131... | |||
131 | } while(l != []); |
131 | } while(l != []); |
|
132 | return llDumpList2String(v, ","); |
132 | return llDumpList2String(v, ","); |
|
133 | } |
133 | } |
|
Line 134... | Line 134... | |||
134 | |
134 | |
|
135 | /////////////////////////////////////////////////////////////////////////// |
135 | /////////////////////////////////////////////////////////////////////////// |
|
136 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
136 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
137 | /////////////////////////////////////////////////////////////////////////// |
137 | /////////////////////////////////////////////////////////////////////////// |
|
138 | // unescapes a string in conformance with RFC1738 |
138 | // unescapes a string in conformance with RFC1738 |
|
139 | string wasURLUnescape(string i) { |
139 | string wasURLUnescape(string i) { |
|
140 | return llUnescapeURL( |
140 | return llUnescapeURL( |