Fix crash when chatting from terminal chat console

This commit is contained in:
ANAND 2020-05-08 11:51:22 +05:30 committed by GitHub
parent b1aa1366f4
commit 3de7c4337d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,11 @@ minetest.register_on_leaveplayer(function(player)
end)
minetest.register_on_chat_message(function(playerName, message)
-- Verify that there is a player, and that the player is online
if not playerName or not minetest.get_player_by_name(playerName) then
return
end
players[playerName]["lastAction"] = minetest.get_gametime()
end)