Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  It was found that in the CTF repo they fixed this issue... but we just
simply didn't apply the fix they did.

  This was fixed in their repo as issue [623](MT-CTF/capturetheflag#623)
  • Loading branch information
david committed Jul 22, 2021
1 parent 7145ac4 commit 2c6af77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ start to be warned via chat message.

- 07/22/2021 Beanzilla added the priv bypass_afk_kick which prevents being kicked for an unlimited amount of time. (Default's
to being granted to server admin and if single player)
- 07/22/2021 Beanzilla fixed issue #4
5 changes: 5 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ to this software to the public domain worldwide. This software is
distributed without any warranty.
]]

-- Settings
local MAX_INACTIVE_TIME = 300
local CHECK_INTERVAL = 1
local WARN_TIME = 20
Expand All @@ -27,6 +28,10 @@ minetest.register_on_leaveplayer(function(player)
end)

minetest.register_on_chat_message(function(playerName, message)
-- Verify that it's a player and that it is not the terminal
if not playerName or not minetest.get_player_by_name(playerName) then
return -- Abort tracking the last action
end
players[playerName]["lastAction"] = minetest.get_gametime()
end)

Expand Down

0 comments on commit 2c6af77

Please sign in to comment.