Fix crash when chatting from terminal chat console
This commit is contained in:
parent
b1aa1366f4
commit
3de7c4337d
1 changed files with 5 additions and 0 deletions
|
@ -29,6 +29,11 @@ minetest.register_on_leaveplayer(function(player)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_chat_message(function(playerName, message)
|
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()
|
players[playerName]["lastAction"] = minetest.get_gametime()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue