/source/eggdrop/ban.lsl |
@@ -235,14 +235,12 @@ |
) |
); |
|
// 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) != "ban") |
return; |
|
/source/eggdrop/configuration.txt |
@@ -12,8 +12,8 @@ |
# settings in Corrade.ini otherwise the script will not work at all. |
|
# Set this to the UUID of the Corrade bot. |
# Ecto Resident |
corrade = "2ac12631-b9e8-4ec2-822e-946591a41469" |
# Corrade Resident |
corrade = "2783a9d0-7e5d-4598-b127-d88ebdf1091d" |
|
# The name of the group - it can also be the UUID of the group. |
group = "My Group" |
@@ -21,12 +21,9 @@ |
# The password for the group. |
password = "mypassword" |
|
# The notification tag - any string you can come up with except the empty string. |
notification tag = "5dfea3c3-1d70-4477-89a8-835072fbb6fa" |
# The version that this template is compatible with. |
version = 9.163 |
|
# The version that this template is compatible with (no need to change). |
version = 9.164 |
|
# The character to use for commands. |
command = @ |
|
@@ -33,19 +30,10 @@ |
# The range for the dice rolling command (inclusive). |
roll range = 3,64 |
|
# The roles that are eligible for administrative group functions such as "eject". |
# The roles that are eligible for administrative group functions. |
admin roles = Owners,Officers,Ecto |
|
# Restrict wiki operations to admin roles. |
restricted wiki = True |
|
# Wiki database table. |
wiki table = "corrade-eggdrop-wiki" |
|
# MOTD database table. |
motd table = "corrade-eggdrop-motd" |
|
# The name of the help notecard in this primitive's inventory. |
help card = "[WaS] Corrade: Eggdrop - Help Card" |
|
########################### END CONFIGURATION ############################# |
/source/eggdrop/dice.lsl |
@@ -220,14 +220,12 @@ |
) |
); |
|
// 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) != "roll") |
return; |
|
/source/eggdrop/eval.lsl |
@@ -388,14 +388,12 @@ |
) |
); |
|
// 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) != "eval") |
return; |
|
/source/eggdrop/fortune.lsl |
@@ -259,14 +259,12 @@ |
) |
); |
|
// 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) != "fortune") |
return; |
|
/source/eggdrop/help.lsl |
@@ -212,20 +212,6 @@ |
if(wasKeyValueGet("type", message) != "group") |
return; |
|
string firstname = wasURLUnescape( |
wasKeyValueGet( |
"firstname", |
message |
) |
); |
|
string agent = (key)wasURLUnescape( |
wasKeyValueGet( |
"agent", |
message |
) |
); |
|
// Get the sent message. |
data = wasURLUnescape( |
wasKeyValueGet( |
@@ -242,20 +228,24 @@ |
[wasKeyValueGet("command", configuration), " "], []); |
if(llList2String(command, 0) != "help") |
return; |
|
if(llGetInventoryType(wasKeyValueGet("help card", configuration)) |
!= INVENTORY_NOTECARD) { |
data = "Hmm. I have not notecard to hand out - contact my owner please?"; |
return; |
} |
|
// Hand out the notecard. |
llGiveInventory(agent, |
wasKeyValueGet("help card", configuration) |
); |
|
data = "Sent you a help notecard " + firstname + ". Please check your inventory."; |
|
data =" |
|
~~~~~~~~~ Corrade Eggdrop ~~~~~~~~~ |
Syntax: @<command> [OPTIONS] |
\t@roll <number>\t- Roll a dice with <number> sides. |
\t@spank <name>\t- Spank a group member. |
\t@wiki <get|set|dir>\t- Wiki commands. |
\t@fortune\t\t- Get a random fortune cookie. |
\t@joke\t\t- Get a random joke. |
\t@eval <expression>\t- Evaluate a mathematical expression. |
\t@ban <first> <last>\t- Ban a group member by name. |
\t@invite <first> <last>\t- Invite agent to group by name. |
|
\t@help\t- This help message. |
~~~~~~~~~ Corrade Eggdrop ~~~~~~~~~ |
"; |
|
state tell; |
} |
on_rez(integer num) { |
/source/eggdrop/invite.lsl |
@@ -222,14 +222,12 @@ |
) |
); |
|
// 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) != "invite") |
return; |
|
/source/eggdrop/joke.lsl |
@@ -259,14 +259,12 @@ |
) |
); |
|
// 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) != "joke") |
return; |
|
/source/eggdrop/spank.lsl |
@@ -220,14 +220,12 @@ |
) |
); |
|
// 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; |
|
@@ -305,7 +303,7 @@ |
wasListToCSV( |
[ |
"match", |
wasURLEscape("(?i),?\"([^\",$]*" + data + "[^\",$]*)\",?") |
wasURLEscape("(?i),?([^,$]*" + data +"[^,$]*),?") |
] |
) |
), |
@@ -330,25 +328,21 @@ |
} |
|
// Dump the members to a list. |
list spankees = wasCSVToList( |
wasURLUnescape( |
wasKeyValueGet("data", body) |
data = llList2CSV( |
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; |
/source/eggdrop/wiki.lsl |
@@ -273,9 +273,7 @@ |
configuration |
) |
), |
"SQL", wasURLEscape("CREATE TABLE IF NOT EXISTS \"" + |
wasKeyValueGet("wiki table", configuration) + |
"\" (path text unique collate nocase, data text)"), |
"SQL", wasURLEscape("CREATE TABLE IF NOT EXISTS corradeeggdrop (path text unique collate nocase, data text)"), |
"callback", wasURLEscape(URL) |
] |
) |
@@ -339,14 +337,12 @@ |
) |
); |
|
// 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) != "wiki") |
return; |
|
@@ -440,16 +436,12 @@ |
configuration |
) |
), |
"SQL", wasURLEscape("DELETE FROM \"" + |
wasKeyValueGet("wiki table", configuration) + |
"\" WHERE path=:path"), |
"data", wasURLEscape( |
wasListToCSV( |
[ |
"path", |
wasURLEscape("path") |
] |
) |
"SQL", wasURLEscape("DELETE FROM corradeeggdrop WHERE path=:path"), |
"data", wasListToCSV( |
[ |
"path", |
wasURLEscape("path") |
] |
), |
"callback", wasURLEscape(URL) |
] |
@@ -480,18 +472,14 @@ |
configuration |
) |
), |
"SQL", wasURLEscape("REPLACE INTO \"" + |
wasKeyValueGet("wiki table", configuration) + |
"\" (path, data) VALUES (:path, :data)"), |
"data", wasURLEscape( |
wasListToCSV( |
[ |
"path", |
wasURLEscape(path), |
"data", |
wasURLEscape(data) |
] |
) |
"SQL", wasURLEscape("REPLACE INTO corradeeggdrop (path, data) VALUES (:path, :data)"), |
"data", wasListToCSV( |
[ |
"path", |
wasURLEscape("path"), |
"data", |
wasURLEscape("data") |
] |
), |
"callback", wasURLEscape(URL) |
] |
@@ -562,16 +550,12 @@ |
configuration |
) |
), |
"SQL", wasURLEscape("SELECT data FROM \"" + |
wasKeyValueGet("wiki table", configuration) + |
"\" WHERE path=:path"), |
"data", wasURLEscape( |
wasListToCSV( |
[ |
"path", |
wasURLEscape(path) |
] |
) |
"SQL", wasURLEscape("SELECT data FROM corradeeggdrop WHERE path=:path"), |
"data", wasListToCSV( |
[ |
"path", |
wasURLEscape(path) |
] |
), |
"callback", wasURLEscape(URL) |
] |
@@ -657,16 +641,12 @@ |
configuration |
) |
), |
"SQL", wasURLEscape("SELECT path FROM \"" + |
wasKeyValueGet("wiki table", configuration) + |
"\" WHERE path like :path"), |
"data", wasURLEscape( |
wasListToCSV( |
[ |
"path", |
wasURLEscape(path + "%") |
] |
) |
"SQL", wasURLEscape("SELECT path FROM corradeeggdrop WHERE path like :path"), |
"data", wasListToCSV( |
[ |
"path", |
wasURLEscape(path + "%") |
] |
), |
"callback", wasURLEscape(URL) |
] |
/source/eggdrop/control.lsl |
@@ -122,7 +122,9 @@ |
string URL = ""; |
|
// The notifications to bind to. |
list notifications = [ "group", "membership" ]; |
list notifications = [ "group", "notice" ]; |
// The tag that this script uses for notifications. |
string EGG_TAG = "147d8bf1-4fbc-4c31-b0ea-1d2a72a41041"; |
|
default { |
state_entry() { |
@@ -294,12 +296,7 @@ |
) |
), |
"action", "remove", |
"tag", wasURLEscape( |
wasKeyValueGet( |
"notification tag", |
configuration |
) |
), |
"tag", wasURLEscape(EGG_TAG), |
"callback", wasURLEscape(URL) |
] |
) |
@@ -370,12 +367,7 @@ |
) |
), |
"URL", wasURLEscape(URL), |
"tag", wasURLEscape( |
wasKeyValueGet( |
"notification tag", |
configuration |
) |
), |
"tag", wasURLEscape(EGG_TAG), |
"callback", wasURLEscape(URL) |
] |
) |
@@ -482,7 +474,7 @@ |
"version", |
configuration |
) + |
" for this template." |
" for this HUD." |
); |
compatible = FALSE; |
//llReleaseURL(URL); |