Craig's Server

User avatar
Esteban
Member
 
Posts: 872
Joined: Sun Sep 08, 2013 13:26
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: [0.4.10-dev] Craig's Server

by Esteban » Mon Oct 13, 2014 23:21

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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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)
Last edited by Esteban on Thu Oct 16, 2014 12:10, edited 1 time in total.
 

User avatar
CraigyDavi
Member
 
Posts: 565
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

Re: [0.4.10-dev] Craig's Server

by CraigyDavi » Wed Oct 15, 2014 18:12

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


Welcome back :)

RHR wrote:@Craig: Could you please update the overview map? :)

Yep I'll do that the next time I make a backup!

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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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)

Looks useful, I might add this.
 

User avatar
lisacvuk
Member
 
Posts: 165
Joined: Sat Jul 19, 2014 11:52
GitHub: lisacvuk
IRC: lisac
In-game: lisacvuk

Re: [0.4.10-dev] Craig's Server

by lisacvuk » Tue Oct 28, 2014 13:07

Hey Craig,
I noticed server is down. Will you switch to VPS soon?
lisacvuk
400 character limit? Am I writing a book?
I'm a Minetest player, 'learning' C++ and OpenGL, listening to Blind Guardian, Nightwish, Amon Amarth. Administrator on Craig's server. Likes cookies.
I live in Serbia.
 

jwpwns
Member
 
Posts: 53
Joined: Sat Feb 08, 2014 22:22

Re: [0.4.10-dev] Craig's Server

by jwpwns » Mon Nov 17, 2014 20:22

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.
 

User avatar
CraigyDavi
Member
 
Posts: 565
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

Re: [0.4.10-dev] Craig's Server

by CraigyDavi » Mon Nov 17, 2014 22:04

lisacvuk wrote:Hey Craig,
I noticed server is down. Will you switch to VPS soon?
lisacvuk



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.


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.
 

User avatar
gabo.xandre
Member
 
Posts: 70
Joined: Sat Mar 15, 2014 12:54
GitHub: GaboXandre
IRC: GaboXandre
In-game: Gabo

Re: [0.4.10-dev] Craig's Server

by gabo.xandre » Sun Dec 28, 2014 20:43

Today I took a tour in the railway build by Mese Rails Inc.
Image

Great job Lisac and Raven!
 

User avatar
the_raven_262
Member
 
Posts: 68
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore

Re: [0.4.11-dev] Craig's Server

by the_raven_262 » Mon Dec 29, 2014 17:33

The part of the railway that you got the screenshot on was built by hijenavuk. :)
My favourite quote is NOOT NOOT! (By comrade Pingu)
Which roughly translates to "The revolution will be swift and without mercy!"
 

User avatar
lisacvuk
Member
 
Posts: 165
Joined: Sat Jul 19, 2014 11:52
GitHub: lisacvuk
IRC: lisac
In-game: lisacvuk

Re: [0.4.11-dev] Craig's Server

by lisacvuk » Tue Dec 30, 2014 11:31

Well he is in Mese Rails XD
400 character limit? Am I writing a book?
I'm a Minetest player, 'learning' C++ and OpenGL, listening to Blind Guardian, Nightwish, Amon Amarth. Administrator on Craig's server. Likes cookies.
I live in Serbia.
 

User avatar
gabo.xandre
Member
 
Posts: 70
Joined: Sat Mar 15, 2014 12:54
GitHub: GaboXandre
IRC: GaboXandre
In-game: Gabo

Re: [0.4.11-dev] Craig's Server

by gabo.xandre » Tue Dec 30, 2014 13:09

lisacvuk wrote:Well he is in Mese Rails XD


Indeed, all the way from Spawn Station. So contratulations to everyone involved in Mese Rails Inc.

BTW, Happy New Year everyone!!!
 

nanepiwo
Member
 
Posts: 18
Joined: Mon Jan 05, 2015 20:13
GitHub: nanepiwo
IRC: nanepiwo or nane
In-game: nanepiwo

Re: [0.4.11-dev] Craig's Server

by nanepiwo » Tue Jan 06, 2015 02:25

Chop_by_Ferdi_Napoli.png
Skin to Add
Chop_by_Ferdi_Napoli.png (1.94 KiB) Viewed 3596 times
Could I have my skin changed to this please? My in-game username is nanepiwo.
 

User avatar
gabo.xandre
Member
 
Posts: 70
Joined: Sat Mar 15, 2014 12:54
GitHub: GaboXandre
IRC: GaboXandre
In-game: Gabo

Re: [0.4.11-dev] Craig's Server

by gabo.xandre » Thu Jan 08, 2015 16:36

And could you add my skin, too?

name:King Sam
Image
author: Gabo
license:CC BY-NC-SA 3.0
view in 3d! on skin Database
Download
 

nanepiwo
Member
 
Posts: 18
Joined: Mon Jan 05, 2015 20:13
GitHub: nanepiwo
IRC: nanepiwo or nane
In-game: nanepiwo

Re: [0.4.11-dev] Craig's Server

by nanepiwo » Fri Jan 09, 2015 01:20

Ooh, nice skin!
 

User avatar
CraigyDavi
Member
 
Posts: 565
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

Re: [0.4.11-dev] Craig's Server

by CraigyDavi » Tue Jan 13, 2015 16:15

Added both skins.
 

ZionMoulder
New member
 
Posts: 5
Joined: Mon Jan 26, 2015 00:19
In-game: ZionMoulde+ZMoulder+ZMoulder98

Re: [0.4.11-dev] Craig's Server

by ZionMoulder » Thu Jan 29, 2015 23:00

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.
 

User avatar
gabo.xandre
Member
 
Posts: 70
Joined: Sat Mar 15, 2014 12:54
GitHub: GaboXandre
IRC: GaboXandre
In-game: Gabo

Re: [0.4.11-dev] Craig's Server

by gabo.xandre » Tue Feb 10, 2015 04:33

Wow, Craig's server was #1 on the server's list !!!

Image
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [0.4.11-dev] Craig's Server

by ABJ » Sat Mar 14, 2015 15:50

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?
 

User avatar
gabo.xandre
Member
 
Posts: 70
Joined: Sat Mar 15, 2014 12:54
GitHub: GaboXandre
IRC: GaboXandre
In-game: Gabo

Re: [0.4.11-dev] Craig's Server

by gabo.xandre » Tue Mar 31, 2015 01:58

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?


The server is temporarily down.
In the meantime...

Image
Last edited by gabo.xandre on Wed Apr 01, 2015 22:18, edited 1 time in total.
 

jwpwns
Member
 
Posts: 53
Joined: Sat Feb 08, 2014 22:22

Re: [0.4.11-dev] Craig's Server

by jwpwns » Tue Mar 31, 2015 18:51

Is the server done?
Last edited by jwpwns on Tue Mar 31, 2015 19:09, edited 1 time in total.
 

User avatar
gabo.xandre
Member
 
Posts: 70
Joined: Sat Mar 15, 2014 12:54
GitHub: GaboXandre
IRC: GaboXandre
In-game: Gabo

Re: [0.4.11-dev] Craig's Server

by gabo.xandre » Tue Mar 31, 2015 18:54

jwpwns wrote:Is the server done? if it is il be making my own shortly


The server has been down a few days, but it will be back soon. Nothing to worry about.
 

jwpwns
Member
 
Posts: 53
Joined: Sat Feb 08, 2014 22:22

Re: [0.4.11-dev] Craig's Server

by jwpwns » Tue Mar 31, 2015 19:10

mk
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [0.4.11-dev] Craig's Server

by ABJ » Wed Apr 01, 2015 11:36

gabo.xandre wrote:
jwpwns wrote:Is the server done? if it is il be making my own shortly


The server has been down a few days, but it will be back soon. Nothing to worry about.

How many?
 

User avatar
MarisD
Member
 
Posts: 16
Joined: Wed Apr 01, 2015 19:13
IRC: Clouds-Disabled
In-game: disableclouds enableclouds

Re: [0.4.11-dev] Craig's Server

by MarisD » Wed Apr 01, 2015 19:26

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.
 

jwpwns
Member
 
Posts: 53
Joined: Sat Feb 08, 2014 22:22

Re: [0.4.11-dev] Craig's Server

by jwpwns » Thu Apr 02, 2015 01:26

MarisD wrote:Hes probably, got to get money.


for what? last i new it was hosted on his pc and he hasn't been on the forums since

Sat Feb 14, 2015 12:04 pm
 

User avatar
MarisD
Member
 
Posts: 16
Joined: Wed Apr 01, 2015 19:13
IRC: Clouds-Disabled
In-game: disableclouds enableclouds

Re: [0.4.11-dev] Craig's Server

by MarisD » Thu Apr 02, 2015 05:47

jwpwns wrote:
MarisD wrote:Hes probably, got to get money.


for what? last i new it was hosted on his pc and he hasn't been on the forums since

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.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [0.4.11-dev] Craig's Server

by ABJ » Thu Apr 02, 2015 11:05

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
 

User avatar
gabo.xandre
Member
 
Posts: 70
Joined: Sat Mar 15, 2014 12:54
GitHub: GaboXandre
IRC: GaboXandre
In-game: Gabo

Re: [0.4.11-dev] Craig's Server

by gabo.xandre » Thu Apr 02, 2015 12:01

ABJ wrote: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


Yes ABJ, my server is up and so is foot_on_teh_hill's !
You're welcome to visit us :D
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [0.4.11-dev] Craig's Server

by ABJ » Thu Apr 02, 2015 17:29

gabo.xandre wrote:
ABJ wrote: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


Yes ABJ, my server is up and so is foot_on_teh_hill's !
You're welcome to visit us :D


But now they're not even on the public list O_O
 

User avatar
gabo.xandre
Member
 
Posts: 70
Joined: Sat Mar 15, 2014 12:54
GitHub: GaboXandre
IRC: GaboXandre
In-game: Gabo

Re: [0.4.11-dev] Craig's Server

by gabo.xandre » Thu Apr 02, 2015 20:33

ABJ wrote:
gabo.xandre wrote:
ABJ wrote: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


Yes ABJ, my server is up and so is foot_on_teh_hill's !
You're welcome to visit us :D


But now they're not even on the public list O_O


Look again, my server is up almost all day (and night).
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [0.4.11-dev] Craig's Server

by ABJ » Fri Apr 03, 2015 03:41

I looked so many times! It isn't there! (Oh and by the way some AKIBA is at the bottom;is it above that server?)
 

User avatar
lisacvuk
Member
 
Posts: 165
Joined: Sat Jul 19, 2014 11:52
GitHub: lisacvuk
IRC: lisac
In-game: lisacvuk

Re: [0.4.11-dev] Craig's Server

by lisacvuk » Sun Apr 05, 2015 18:53

Craig, if u ever come online again, me and raven offer free hosting for ur server.
400 character limit? Am I writing a book?
I'm a Minetest player, 'learning' C++ and OpenGL, listening to Blind Guardian, Nightwish, Amon Amarth. Administrator on Craig's server. Likes cookies.
I live in Serbia.
 

PreviousNext

Return to Minetest Servers

Who is online

Users browsing this forum: No registered users and 17 guests

cron