corrade-lsl-templates – Diff between revs 5 and 29

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
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 makes Corrade sit on the ground. 5 // This script makes Corrade sit on the ground.
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 = "";