tchat: add team clear and chat clear

wsc-master-rebase
cron 2020-10-05 23:27:30 +00:00 committed by Schmappie Eldress
parent 4a12c4b818
commit 6697a9e235
1 changed files with 11 additions and 1 deletions

View File

@ -402,7 +402,8 @@ local function autoclear_chat()
end
function tchat.chat_clear()
chat = {}
tchat.chat = {}
update_chat_str()
end
function tchat.chat_set(message_list)
@ -600,6 +601,15 @@ minetest.register_chatcommand("tdel", {
description = "Remove player from your team.",
func = tchat.team_remove_player
})
minetest.register_chatcommand("tclear", {
description = "Clear team list.",
func = tchat.team_clear
})
minetest.register_chatcommand("tchat_clear", {
description = "Clear team chat widget.",
func = tchat.chat_clear
})
minetest.register_chatcommand("coords", {
params = "<message>",