diff options
Diffstat (limited to 'chat_commands.lua')
-rw-r--r-- | chat_commands.lua | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/chat_commands.lua b/chat_commands.lua new file mode 100644 index 0000000..e5c6959 --- /dev/null +++ b/chat_commands.lua @@ -0,0 +1,37 @@ +minetest.register_chatcommand("list_awards", { + params = "obsolete", + description = "list_awards: obsolete. Use /awards", + func = function(name, param) + minetest.chat_send_player(name, "This command has been made obsolete. Use /awards instead.") + awards.showto(name, name, nil, false) + end +}) + +minetest.register_chatcommand("awards", { + params = "", + description = "awards: list awards", + func = function(name, param) + awards.showto(name, name, nil, false) + end +}) + +minetest.register_chatcommand("cawards", { + params = "", + description = "awards: list awards in chat", + func = function(name, param) + awards.showto(name, name, nil, true) + end +}) + +minetest.register_chatcommand("awd", { + params = "award name", + description = "awd: Details of awd gotten", + func = function(name, param) + local def = awards.def[param] + if def then + minetest.chat_send_player(name,def.title..": "..def.description) + else + minetest.chat_send_player(name,"Award not found.") + end + end +}) |