kaeza on Disconnect player if inactive thread wrote:Hello and welcome.
Something like this should work:
Code: Select all
-- Interval between movement checks (in seconds). local INTERVAL = 5 -- Minimum distance to move to register as not AFK (in blocks). local MINDIST = 0.2 -- If player does not move within this time, kick player (in seconds). local TIMEOUT = 300 -- 5 minutes local time_afk = { } local last_pos = { } local function check_moved() for _, p in ipairs(minetest.get_connected_players()) do local plname = p:get_player_name() local pos = p:getpos() local kicked if last_pos[plname] then local d = vector.distance(last_pos[plname], pos) print("Player: "..plname..", Dist: "..d) if d < MINDIST then time_afk[plname] = (time_afk[plname] or 0) + INTERVAL if time_afk[plname] >= TIMEOUT then minetest.kick_player(plname, "Inactive for "..TIMEOUT.." seconds.") kicked = true end else time_afk[plname] = 0 end end if not kicked then last_pos[plname] = pos end end minetest.after(INTERVAL, check_moved) end minetest.after(INTERVAL, check_moved) minetest.register_on_leaveplayer(function(player) local plname = player:get_player_name() time_afk[plname] = nil last_pos[plname] = nil end)
[Server] Craig's Server
Re: [0.4.10-dev] Craig's Server
Hey Craigy! I think this would be useful to you. Many users just connect and are inactive, taking valuable space for player that are actually going to play. The following code kicks players if they stay inactive for too long:
Last edited by Esteban on Thu Oct 16, 2014 12:10, edited 1 time in total.
Scan avatar or click here to read a Message of Hope (PDF)
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
Re: [0.4.10-dev] Craig's Server
Welcome back :)Landrover110 wrote:Hey guys its landrover i have been in the bush for many months so haven't been able to play i was doing antipoaching and stuff so i am going to becoming back online to continue building Landrovers cheap shop (LCS) haven't been on the server for months so it must of changed alot see you all soon
best regards
Landrover
Yep I'll do that the next time I make a backup!RHR wrote:@Craig: Could you please update the overview map? :)
Looks useful, I might add this.Esteban wrote:Hey Craigy! I think this would be useful to you. Many users just connect and are inactive, taking valuable space for player that are actually going to play. The following code kicks players if they stay inactive for too long:
kaeza on Disconnect player if inactive thread wrote:Hello and welcome.
Something like this should work:
Code: Select all
-- Interval between movement checks (in seconds). local INTERVAL = 5 -- Minimum distance to move to register as not AFK (in blocks). local MINDIST = 0.2 -- If player does not move within this time, kick player (in seconds). local TIMEOUT = 300 -- 5 minutes local time_afk = { } local last_pos = { } local function check_moved() for _, p in ipairs(minetest.get_connected_players()) do local plname = p:get_player_name() local pos = p:getpos() local kicked if last_pos[plname] then local d = vector.distance(last_pos[plname], pos) print("Player: "..plname..", Dist: "..d) if d < MINDIST then time_afk[plname] = (time_afk[plname] or 0) + INTERVAL if time_afk[plname] >= TIMEOUT then minetest.kick_player(plname, "Inactive for "..TIMEOUT.." seconds.") kicked = true end end end if not kicked then last_pos[plname] = pos end end minetest.after(INTERVAL, check_moved) end minetest.after(INTERVAL, check_moved) minetest.register_on_leaveplayer(function(player) local plname = player:get_player_name() time_afk[plname] = nil last_pos[plname] = nil end)
- lisacvuk
- Member
- Posts: 274
- Joined: Sat Jul 19, 2014 11:52
- GitHub: lisacvuk
- IRC: lisac
- In-game: lisacvuk
- Location: Serbia, Užice
Re: [0.4.10-dev] Craig's Server
Hey Craig,
I noticed server is down. Will you switch to VPS soon?
lisacvuk
I noticed server is down. Will you switch to VPS soon?
lisacvuk
It's lisac, not lisa.
400 character limit? Am I writing a book?
Administrator on Craig's server. Minetest player.
"The enemy pales when they see the face of Dazzle!" ~ Dazzle obviously.
I live in Serbia.
Steam | OpenDOTA
My mods:
Tool ranks
I appreciate donations in TF2 items. :)
400 character limit? Am I writing a book?
Administrator on Craig's server. Minetest player.
"The enemy pales when they see the face of Dazzle!" ~ Dazzle obviously.
I live in Serbia.
Steam | OpenDOTA
My mods:
Tool ranks
I appreciate donations in TF2 items. :)
Re: [0.4.10-dev] Craig's Server
Server down? you should switch to a vps tho there cheap the server always does good until it lags or turns off for a while.
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
Re: [0.4.10-dev] Craig's Server
lisacvuk wrote:Hey Craig,
I noticed server is down. Will you switch to VPS soon?
lisacvuk
Hi guys, sorry about the downtime - I did a complete backup of my computer and it took a few days. The server in up currently and should be up 24/7 from sometime this week.jwpwns wrote:Server down? you should switch to a vps tho there cheap the server always does good until it lags or turns off for a while.
- gabo.xandre
- Member
- Posts: 70
- Joined: Sat Mar 15, 2014 12:54
- GitHub: GaboXandre
- IRC: GaboXandre
- In-game: Gabo
- Location: Argentina
- Contact:
Re: [0.4.10-dev] Craig's Server
Today I took a tour in the railway build by Mese Rails Inc.
Great job Lisac and Raven!
Great job Lisac and Raven!
- the_raven_262
- Member
- Posts: 343
- Joined: Mon Sep 22, 2014 09:30
- GitHub: theraven262
- IRC: [Discord unfortunately] corvus262
Re: [0.4.11-dev] Craig's Server
The part of the railway that you got the screenshot on was built by hijenavuk. :)
- lisacvuk
- Member
- Posts: 274
- Joined: Sat Jul 19, 2014 11:52
- GitHub: lisacvuk
- IRC: lisac
- In-game: lisacvuk
- Location: Serbia, Užice
Re: [0.4.11-dev] Craig's Server
Well he is in Mese Rails XD
It's lisac, not lisa.
400 character limit? Am I writing a book?
Administrator on Craig's server. Minetest player.
"The enemy pales when they see the face of Dazzle!" ~ Dazzle obviously.
I live in Serbia.
Steam | OpenDOTA
My mods:
Tool ranks
I appreciate donations in TF2 items. :)
400 character limit? Am I writing a book?
Administrator on Craig's server. Minetest player.
"The enemy pales when they see the face of Dazzle!" ~ Dazzle obviously.
I live in Serbia.
Steam | OpenDOTA
My mods:
Tool ranks
I appreciate donations in TF2 items. :)
- gabo.xandre
- Member
- Posts: 70
- Joined: Sat Mar 15, 2014 12:54
- GitHub: GaboXandre
- IRC: GaboXandre
- In-game: Gabo
- Location: Argentina
- Contact:
Re: [0.4.11-dev] Craig's Server
Indeed, all the way from Spawn Station. So contratulations to everyone involved in Mese Rails Inc.lisacvuk wrote:Well he is in Mese Rails XD
BTW, Happy New Year everyone!!!
-
- Member
- Posts: 23
- Joined: Mon Jan 05, 2015 20:13
- GitHub: nanepiwo
- IRC: nanepiwo or nane
- In-game: nanepiwo
Re: [0.4.11-dev] Craig's Server
Could I have my skin changed to this please? My in-game username is nanepiwo.
- gabo.xandre
- Member
- Posts: 70
- Joined: Sat Mar 15, 2014 12:54
- GitHub: GaboXandre
- IRC: GaboXandre
- In-game: Gabo
- Location: Argentina
- Contact:
Re: [0.4.11-dev] Craig's Server
And could you add my skin, too?
name:King Sam
author: Gabo
license:CC BY-NC-SA 3.0
view in 3d! on skin Database
Download
name:King Sam
author: Gabo
license:CC BY-NC-SA 3.0
view in 3d! on skin Database
Download
-
- Member
- Posts: 23
- Joined: Mon Jan 05, 2015 20:13
- GitHub: nanepiwo
- IRC: nanepiwo or nane
- In-game: nanepiwo
Re: [0.4.11-dev] Craig's Server
Ooh, nice skin!
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
Re: [0.4.11-dev] Craig's Server
Added both skins.
-
- New member
- Posts: 5
- Joined: Mon Jan 26, 2015 00:19
- In-game: ZionMoulde+ZMoulder+ZMoulder98
- Location: The Great Corn Republic (Indiana, USA)
Re: [0.4.11-dev] Craig's Server
I really enjoy your server. Yesterday I built my first building, a small shack. I'm going to move soon, however, because someone keeps trying to build over my shack. It's small anyway, and I'm getting really good at mining.
- gabo.xandre
- Member
- Posts: 70
- Joined: Sat Mar 15, 2014 12:54
- GitHub: GaboXandre
- IRC: GaboXandre
- In-game: Gabo
- Location: Argentina
- Contact:
Re: [0.4.11-dev] Craig's Server
Wow, Craig's server was #1 on the server's list !!!
-
- Member
- Posts: 3015
- Joined: Sun Jan 18, 2015 13:02
- GitHub: ABJ-MV
- In-game: ABJ
- Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.
Re: [0.4.11-dev] Craig's Server
The server is not shpwing on the public list in my minetest. It hasn't been on the list since a few days. What's happened?
- gabo.xandre
- Member
- Posts: 70
- Joined: Sat Mar 15, 2014 12:54
- GitHub: GaboXandre
- IRC: GaboXandre
- In-game: Gabo
- Location: Argentina
- Contact:
Re: [0.4.11-dev] Craig's Server
The server is temporarily down.ABJ wrote:The server is not shpwing on the public list in my minetest. It hasn't been on the list since a few days. What's happened?
In the meantime...
Last edited by gabo.xandre on Wed Apr 01, 2015 22:18, edited 1 time in total.
Re: [0.4.11-dev] Craig's Server
Is the server done?
Last edited by jwpwns on Tue Mar 31, 2015 19:09, edited 1 time in total.
- gabo.xandre
- Member
- Posts: 70
- Joined: Sat Mar 15, 2014 12:54
- GitHub: GaboXandre
- IRC: GaboXandre
- In-game: Gabo
- Location: Argentina
- Contact:
Re: [0.4.11-dev] Craig's Server
The server has been down a few days, but it will be back soon. Nothing to worry about.jwpwns wrote:Is the server done? if it is il be making my own shortly
-
- Member
- Posts: 3015
- Joined: Sun Jan 18, 2015 13:02
- GitHub: ABJ-MV
- In-game: ABJ
- Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.
Re: [0.4.11-dev] Craig's Server
How many?gabo.xandre wrote:The server has been down a few days, but it will be back soon. Nothing to worry about.jwpwns wrote:Is the server done? if it is il be making my own shortly
- MarisD
- Member
- Posts: 16
- Joined: Wed Apr 01, 2015 19:13
- IRC: Clouds-Disabled
- In-game: disableclouds enableclouds
- Location: UK USA
Re: [0.4.11-dev] Craig's Server
Hes probably, got to get money.
I'm disableclouds im mostly, best at C++ e.g. irc, im #2 owner in rnd's lab hopefully soon I'll have a server.
Re: [0.4.11-dev] Craig's Server
for what? last i new it was hosted on his pc and he hasn't been on the forums sinceMarisD wrote:Hes probably, got to get money.
Sat Feb 14, 2015 12:04 pm
- MarisD
- Member
- Posts: 16
- Joined: Wed Apr 01, 2015 19:13
- IRC: Clouds-Disabled
- In-game: disableclouds enableclouds
- Location: UK USA
Re: [0.4.11-dev] Craig's Server
for what? last i new it was hosted on his pc and he hasn't been on the forums sincejwpwns wrote:MarisD wrote:Hes probably, got to get money.
Sat Feb 14, 2015 12:04 pm[/qu. Getting money for hosting maybe.
I'm disableclouds im mostly, best at C++ e.g. irc, im #2 owner in rnd's lab hopefully soon I'll have a server.
-
- Member
- Posts: 3015
- Joined: Sun Jan 18, 2015 13:02
- GitHub: ABJ-MV
- In-game: ABJ
- Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.
Re: [0.4.11-dev] Craig's Server
By the way Gabo is your server up as well? I'm missing my C-D friends so muchhhhhhhhhhhh. Last time I checked (it was way after C-D went down) it was down
Who is online
Users browsing this forum: No registered users and 51 guests