Add files via upload

master
Koda_ 2020-11-13 12:08:39 -08:00 committed by GitHub
parent 785930e72b
commit c714604916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

29
afk/init.lua Normal file
View File

@ -0,0 +1,29 @@
local afklist = {}
minetest.register_chatcommand("afk", {
params = "[Reason]",
description = "Sets your status as AFK",
func = function(name, param)
if afklist[name] then
return false, "You already are AFK."
end
afklist[name] = true
minetest.chat_send_all(name.." is now away \""..param.."\"!")
end,
})
minetest.register_chatcommand("back", {
params = "",
description = "Removes your AFK status",
func = function(name, param)
if not afklist[name] then
return false, "You are not AFK."
end
afklist[name] = nil
minetest.chat_send_all(name.." has returned!")
end,
})

1
afk/mod.conf Normal file
View File

@ -0,0 +1 @@
name = afk