/source/eggdrop/spank.lsl |
@@ -220,12 +220,14 @@ |
) |
); |
|
// Check if this is an eggdrop command. |
if(llGetSubString(data, 0, 0) != |
wasKeyValueGet("command", configuration)) |
return; |
|
|
// Check if the command matches the current module. |
list command = llParseString2List(data, |
[wasKeyValueGet("command", configuration), " "], []); |
[wasKeyValueGet("command", configuration), " "], ["@"]); |
if(llList2String(command, 0) != "spank") |
return; |
|
@@ -303,7 +305,7 @@ |
wasListToCSV( |
[ |
"match", |
wasURLEscape("(?i),?([^,$]*" + data +"[^,$]*),?") |
wasURLEscape("(?i),?\"([^\",$]*" + data + "[^\",$]*)\",?") |
] |
) |
), |
@@ -328,21 +330,25 @@ |
} |
|
// Dump the members to a list. |
data = llList2CSV( |
wasCSVToList( |
wasURLUnescape( |
wasKeyValueGet("data", body) |
) |
list spankees = wasCSVToList( |
wasURLUnescape( |
wasKeyValueGet("data", body) |
) |
); |
|
// Limit to two people to spank. |
if(llGetListLength(spankees) > 2) { |
data = "So many people, so few hands!"; |
return; |
} |
|
data = llList2CSV(spankees); |
|
if(data == "") { |
data = "I could not find anyone to spank (story of my life)."; |
state tell; |
} |
|
llOwnerSay("Spanking: " + data); |
|
data = "/me spanks " + data; |
|
state tell; |