Skip to content

Commit

Permalink
add cleanup command
Browse files Browse the repository at this point in the history
fixes #2
  • Loading branch information
BuckarooBanzay committed Sep 8, 2020
1 parent 4a43225 commit 62c62de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chatcommands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ minetest.register_chatcommand("digiline_global_memory", {
return true, dump(digiline_global_memory.get_value(name, param) or "<empty>")
end
})

minetest.register_chatcommand("digiline_global_memory_clear", {
params = "<name>",
description = "clears the global memory of the player",
func = function(name)
digiline_global_memory.store[name] = {}
return true, "Memory cleared"
end
})
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ digiline_send("channel", {
})
```

# Chatcommands

* **/digiline_global_memory [name]** Returns the contents of the current players memory with given name
* **/digiline_global_memory_clear** Clears the current players memory

# TODO

* [ ] memory constraints
Expand Down

0 comments on commit 62c62de

Please sign in to comment.