Skip to content

Commit

Permalink
Fix crash when chatting from terminal chat console
Browse files Browse the repository at this point in the history
  • Loading branch information
ClobberXD committed May 8, 2020
1 parent b1aa136 commit 3de7c43
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mods/other/afkkick/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3de7c43

Please sign in to comment.