Using Minetest in a school

Post Reply
cailseducation
New member
Posts: 4
Joined: Thu Jul 09, 2015 17:40

Using Minetest in a school

by cailseducation » Post

I think there are many benefits of using Minetest in a school and would like to develop and share resources for teachers to use in class. I'm even looking at coding to create mods.
My one concern is that it's too easy to access public servers and this is an e-safety risk for schools. Does anyone know how to disable the public servers tab. I know that the ip addresses can be individually blocked but this isn't reliable as new ones appear frequently.

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

Re: Using Minetest in a school

by lag01 » Post

In minetest.conf you can change
serverlist_url =
to your own server list(i am not sure how to make one, but code is available at github) or just to
serverlist_url = localhost
And also block outgoing port 30000-30099 on schools router.

User avatar
rubenwardy
Moderator
Posts: 6977
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Using Minetest in a school

by rubenwardy » Post

Remove public server list

This gets rid of the public server list, but doesn't disable multiplayer - the user can still connect to a server if they know its IP address.

Go to minetest/builtin/tab_multiplayer.lua
Delete a line like this: "checkbox[0,4.85;cb_public_serverlist;" .. fgettext("Public Serverlist") .. ";" ..
(it is line 29 in my file)

Replace

Code: Select all

if core.setting_getbool("public_serverlist") then
	asyncOnlineFavourites()
else
	menudata.favorites = core.get_favorites("local")
end
with

Code: Select all

if core.setting_getbool("public_serverlist") then
	core.setting_set("public_serverlist", "false")
	menudata.favorites = core.get_favorites("local")
end

or Remove multiplayer

This hides all multiplayer join/start from the mainmenu. It is still possible to join a multiplayer game using the command line ("minetest --address redcrab.suret.net --port 30401 --go") to stop this, you'll need to add 30000 - 30100 to your firewall.

Go to minetest/builtin/mainmenu/init.lua

Remove the following lines:

Code: Select all

tv_main:add(tab_multiplayer)
tv_main:add(tab_server)
near line 129.
Last edited by rubenwardy on Tue Jan 12, 2016 15:01, edited 2 times in total.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

cailseducation
New member
Posts: 4
Joined: Thu Jul 09, 2015 17:40

Re: Using Minetest in a school

by cailseducation » Post

Brilliant, I'll give this a try

User avatar
rubenwardy
Moderator
Posts: 6977
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Using Minetest in a school

by rubenwardy » Post

Note that if you do the second one ("Remove multiplayer") there is no point doing the first ("Remove public server list")
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

cailseducation
New member
Posts: 4
Joined: Thu Jul 09, 2015 17:40

Re: Using Minetest in a school

by cailseducation » Post

Ok great thanks, does this mean that with online servers disabled local servers can still be used, ie on the same network. Hopefully that's the case.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: Using Minetest in a school

by ExeterDad » Post

cailseducation wrote:Ok great thanks, does this mean that with online servers disabled local servers can still be used, ie on the same network. Hopefully that's the case.
Yes. But the users will have to manually type in the ip address and port number of the local server(s)for the first login of each one. Then the ip address(s) will appear in the list for later logins.

Just keep in mind. If users learn the ip addresses of the public servers... they will still be able to join them. They are just "invisible."

cailseducation
New member
Posts: 4
Joined: Thu Jul 09, 2015 17:40

Re: Using Minetest in a school

by cailseducation » Post

Yes, that's fine, I don't think that will be an issue, no less so than internet access. As lonk as they can't easily look at a list of servers on minetest. I can already create local servers using the computer name, eg room4-12 as the PC name on the network. Thanks for all the help.

ttucker
New member
Posts: 2
Joined: Thu May 25, 2017 13:18

Re: Using Minetest in a school

by ttucker » Post

I am using minetest 4.15 windows version and cannot find the code that you mention.

I find tab_multiplayer.lua in builtin/mainmenu, but do not find the referred code.

Maybe you can tell me what I need to modify to remove the server list in the 4.15 windows version.

Thanks.

red-001
Member
Posts: 205
Joined: Tue Jan 26, 2016 20:15
GitHub: red-001
IRC: red-001

Re: Using Minetest in a school

by red-001 » Post

ttucker wrote:I am using minetest 4.15 windows version and cannot find the code that you mention.

I find tab_multiplayer.lua in builtin/mainmenu, but do not find the referred code.

Maybe you can tell me what I need to modify to remove the server list in the 4.15 windows version.

Thanks.

You can still use the method lag01 mentioned.

ttucker
New member
Posts: 2
Joined: Thu May 25, 2017 13:18

Re: Using Minetest in a school

by ttucker » Post

Thank you. What I ended up doing is blocking servers.minetest.net at the firewall. It seems to work.

rgh
Member
Posts: 46
Joined: Fri Oct 07, 2016 13:32

Re: Using Minetest in a school

by rgh » Post

Back in 2015, rubenwardy gave an adaptation to a lua file to remove the public server list.
rubenwardy wrote:

Remove public server list

This gets rid of the public server list, but doesn't disable multiplayer - the user can still connect to a server if they know its IP address.

Go to minetest/builtin/tab_multiplayer.lua
Delete a line like this: "checkbox[0,4.85;cb_public_serverlist;" .. fgettext("Public Serverlist") .. ";" ..
(it is line 29 in my file)

Replace

Code: Select all

if core.setting_getbool("public_serverlist") then
	asyncOnlineFavourites()
else
	menudata.favorites = core.get_favorites("local")
end
with

Code: Select all

if core.setting_getbool("public_serverlist") then
	core.setting_set("public_serverlist", "false")
	menudata.favorites = core.get_favorites("local")
end
Looking at my minetest-0.4.16 installation, there is now no such file.
Could anyone tell me the equivalent current adaptation?

I know I could set
serverlist_url = invalid_address
but that results in a 'Loading...' message that never times out.

red-001
Member
Posts: 205
Joined: Tue Jan 26, 2016 20:15
GitHub: red-001
IRC: red-001

Re: Using Minetest in a school

by red-001 » Post

in "builtin/mainmenu/common.lua" replace

Code: Select all

	if not menudata.public_known then
		menudata.public_known = {{
			name = fgettext("Loading..."),
			description = fgettext_ne("Try reenabling public serverlist and check your internet connection.")
		}}
	end
with

Code: Select all

	if not menudata.public_known then
		menudata.favorites = {{
			name = "",
			description = "",
		}}
		return
	end
It should be somewhere around line 220 but if it's not try searching for the status text.
It's not a perfect solution it will result in an dummy entry in the server list but it's the smallest change that I can see that still allows loading servers from the favourite file/list.

rgh
Member
Posts: 46
Joined: Fri Oct 07, 2016 13:32

Re: Using Minetest in a school

by rgh » Post

Thanks red-001, that works.

The other solution that occurs to me is putting a record in the local dns such that servers.minetest.net resolves to some local machine on which I could run a service that returns the list I want displayed.

Does anyone know exactly what query is sent to serverlist_url and what format is expected to be returned?

red-001
Member
Posts: 205
Joined: Tue Jan 26, 2016 20:15
GitHub: red-001
IRC: red-001

Re: Using Minetest in a school

by red-001 » Post


Post Reply

Who is online

Users browsing this forum: apercy and 7 guests