corrade-lsl-templates – Diff between revs 29 and 41
?pathlinks?
Rev 29 | Rev 41 | |||
---|---|---|---|---|
Line 5... | Line 5... | |||
5 | // A joke module for Corrade Eggdrop. |
5 | // A joke module for Corrade Eggdrop. |
|
6 | // |
6 | // |
|
7 | /////////////////////////////////////////////////////////////////////////// |
7 | /////////////////////////////////////////////////////////////////////////// |
|
Line 8... | Line 8... | |||
8 | |
8 | |
|
9 | /////////////////////////////////////////////////////////////////////////// |
9 | /////////////////////////////////////////////////////////////////////////// |
|
10 | // Copyright (C) 2014 Wizardry and Steamworks - License: CC BY 2.0 // |
10 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
11 | /////////////////////////////////////////////////////////////////////////// |
11 | /////////////////////////////////////////////////////////////////////////// |
|
12 | string wasKeyValueGet(string k, string data) { |
12 | string wasKeyValueGet(string k, string data) { |
|
13 | if(llStringLength(data) == 0) return ""; |
13 | if(llStringLength(data) == 0) return ""; |
|
14 | if(llStringLength(k) == 0) return ""; |
14 | if(llStringLength(k) == 0) return ""; |
|
15 | list a = llParseString2List(data, ["&", "="], []); |
15 | list a = llParseStringKeepNulls(data, ["&", "="], []); |
|
16 | integer i = llListFindList(a, [ k ]); |
16 | integer i = llListFindList(llList2ListStrided(a, 0, -1, 2), [ k ]); |
|
17 | if(i != -1) return llList2String(a, i+1); |
17 | if(i != -1) return llList2String(a, 2*i+1); |
|
18 | return ""; |
18 | return ""; |
|
Line 19... | Line 19... | |||
19 | } |
19 | } |
|
20 | |
20 | |