Page 1 of 1

[Mod] Afk Kick [afkkick] – Automatically kick afk players

Posted: Tue Jan 06, 2015 06:45
by GunshipPenguin
The functionality provided by this mod has been included in my "Server Essentials" mod (viewtopic.php?f=11&t=12445
), further development will take place there


Kicks players after they are Afk for an amount of time. By default, players are kicked after five minutes, although this can be configured, see README.md for more information.

License: CC0 1.0 Universal
Dependencies: None

GitHub:
https://github.com/GunshipPenguin/afkkick

Re: [Mod] Afk Kick [afkkick] -- Automatically kick afk playe

Posted: Tue Jan 06, 2015 10:56
by lag01
Sounds good!

Re: [Mod] Afk Kick [afkkick] – Automatically kick afk player

Posted: Tue Jan 06, 2015 19:05
by Krock
What if someone talks for 10 minutes?

Re: [Mod] Afk Kick [afkkick] – Automatically kick afk player

Posted: Wed Jan 07, 2015 01:55
by GunshipPenguin
Krock wrote:What if someone talks for 10 minutes?
Just made a new commit, a player's kick timer will now reset if they send a chat message.

Re: [Mod] Afk Kick [afkkick] – Automatically kick afk player

Posted: Tue Feb 10, 2015 04:02
by Wuzzy
I would also send a warning message to the player 1 minute before the kick, just to be sure …

Re: [Mod] Afk Kick [afkkick] – Automatically kick afk player

Posted: Thu Mar 05, 2015 15:49
by crazyR
Maybe this should have an option that allows it to only kick players if the server is full?

Re: [Mod] Afk Kick [afkkick] – Automatically kick afk player

Posted: Thu Mar 05, 2015 16:37
by 12Me21
crazyR wrote:Maybe this should have an option that allows it to only kick players if the server is full?
There should be an option that only lets it kick people if there is a certain number of people on the server, or if the server is a certain % full (for example, if there is a maximum of 24 people, and the % is set to 50, it will kick afk people when the server has 12 people.)

Re: [Mod] Afk Kick [afkkick] – Automatically kick afk player

Posted: Mon Mar 23, 2015 17:39
by fireglow
Server crash when a player joins the server:

Code: Select all

2015-03-23_17:38:21.15671 17:38:21: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2015-03-23_17:38:21.15679 17:38:21: ERROR[main]: /srv/minetest/world/worldmods/afkkick/init.lua:60: attempt to index local 'player' (a nil value)
2015-03-23_17:38:21.15683 17:38:21: ERROR[main]: stack traceback:
2015-03-23_17:38:21.15689 17:38:21: ERROR[main]:        /srv/minetest/world/worldmods/afkkick/init.lua:60: in function </srv/minetest/world/worldmods/afkkick/init.lua:33>
2015-03-23_17:38:21.15694 17:38:21: ERROR[main]:        /srv/minetest/bin/../builtin/game/register.lua:341: in function </srv/minetest/bin/../builtin/game/register.lua:329>
2015-03-23_17:38:21.15700 
2015-03-23_17:38:21.15701 In thread 805406400:
2015-03-23_17:38:21.15702 /srv/git/minetest/src/server.cpp:492: void Server::step(float): A fatal error occurred: /srv/minetest/world/worldmods/afkkick/init.lua:60: attempt t
o index local 'player' (a nil value)

Re: [Mod] Afk Kick [afkkick] – Automatically kick afk player

Posted: Thu Mar 26, 2015 02:39
by GunshipPenguin
fireglow wrote:Server crash when a player joins the server:

Code: Select all

2015-03-23_17:38:21.15671 17:38:21: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2015-03-23_17:38:21.15679 17:38:21: ERROR[main]: /srv/minetest/world/worldmods/afkkick/init.lua:60: attempt to index local 'player' (a nil value)
2015-03-23_17:38:21.15683 17:38:21: ERROR[main]: stack traceback:
2015-03-23_17:38:21.15689 17:38:21: ERROR[main]:        /srv/minetest/world/worldmods/afkkick/init.lua:60: in function </srv/minetest/world/worldmods/afkkick/init.lua:33>
2015-03-23_17:38:21.15694 17:38:21: ERROR[main]:        /srv/minetest/bin/../builtin/game/register.lua:341: in function </srv/minetest/bin/../builtin/game/register.lua:329>
2015-03-23_17:38:21.15700 
2015-03-23_17:38:21.15701 In thread 805406400:
2015-03-23_17:38:21.15702 /srv/git/minetest/src/server.cpp:492: void Server::step(float): A fatal error occurred: /srv/minetest/world/worldmods/afkkick/init.lua:60: attempt t
o index local 'player' (a nil value)
I think I've fixed this, check the latest commit. Let me know if you have any more problems.

Re: [Mod] Afk Kick [afkkick] – Automatically kick afk player

Posted: Mon Apr 18, 2016 19:36
by sofar
This is a nice mod and I'd like to make sure we keep it working. Can you submit it to minetest-mods perhaps? see https://minetest-mods.github.io/ !