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

Post Reply
User avatar
GunshipPenguin
Member
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin
Location: Vancouver, BC

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

by GunshipPenguin » Post

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
Last edited by GunshipPenguin on Tue May 03, 2016 00:00, edited 3 times in total.

User avatar
lag01
Member
Posts: 321
Joined: Sun Mar 16, 2014 03:41
GitHub: AndrejIT
IRC: lag01
In-game: lag
Contact:

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

by lag01 » Post

Sounds good!

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

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

by Krock » Post

What if someone talks for 10 minutes?
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
GunshipPenguin
Member
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin
Location: Vancouver, BC

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

by GunshipPenguin » Post

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.

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

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

by Wuzzy » Post

I would also send a warning message to the player 1 minute before the kick, just to be sure …

User avatar
crazyR
Member
Posts: 60
Joined: Thu Jun 19, 2014 14:41
Location: uk

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

by crazyR » Post

Maybe this should have an option that allows it to only kick players if the server is full?

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

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

by 12Me21 » Post

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.)

User avatar
fireglow
Member
Posts: 93
Joined: Fri Mar 28, 2014 11:36
IRC: fireglow
In-game: fireglow
Location: Germany

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

by fireglow » Post

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)

User avatar
GunshipPenguin
Member
Posts: 94
Joined: Tue Jan 28, 2014 00:38
GitHub: GunshipPenguin
IRC: GunshipPenguin
In-game: GunshipPenguin
Location: Vancouver, BC

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

by GunshipPenguin » Post

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.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Post

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/ !

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests