Minetest logo

IRC log for #minetest, 2021-01-28

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:26 Fixer joined #minetest
00:28 daiNoZord joined #minetest
00:29 ar10ch joined #minetest
00:29 daiNoZord joined #minetest
00:30 daiNoZord joined #minetest
00:36 adfeno joined #minetest
00:36 adfeno Hi, I can't how to make a require work after minetest.request_insecure_environment() ?
00:36 adfeno Sorry: meant to ask: “how to”…
00:37 adfeno lua_api.txt doesn't tell much about how to use that.
00:38 adfeno I also already set my mod as trusted
00:39 adfeno but doing a simple “require("some-lua-in-lua-path")” always gives me the same error about mod security.
01:15 alket_ joined #minetest
01:15 m42uko_ joined #minetest
01:41 olliy joined #minetest
01:48 tezcatli joined #minetest
02:14 MTDiscord <e​xe_virus> trusted in minetest.conf?
02:15 MTDiscord <e​xe_virus> also, what are you trying to "require"
02:15 MTDiscord <e​xe_virus> cause you shouldn't need to use require for getting mod-based stuff
02:15 MTDiscord <e​xe_virus> i.e. init.lua in a mod can require adjacent files
02:16 MTDiscord <e​xe_virus> if you need stuff from other mods, they should provide that access to you through a global table variable like minetest.functions work
02:19 Conradis_ joined #minetest
02:19 olliy_ joined #minetest
02:19 I_am_Grid joined #minetest
02:20 qjq joined #minetest
02:21 Peppy_ joined #minetest
02:22 Bombo joined #minetest
02:40 Hawk777 joined #minetest
02:51 daiNoZord Is "home-hosting" a server a bad idea? Any tips?
03:01 MTDiscord <e​xe_virus> Haven't tried, people do it all the time
03:01 MTDiscord <e​xe_virus> use freedns to manage dynamic IPs
03:02 MTDiscord <e​xe_virus> i.e. residential addresses will have their ip address change from time to time
03:02 MTDiscord <e​xe_virus> so you register for a subdomain with freedns
03:02 MTDiscord <e​xe_virus> and you tell it (via a script) when your IP changes
03:02 MTDiscord <e​xe_virus> for example: freeDNS has a minetest.land domain they own
03:03 MTDiscord <e​xe_virus> so you would register for a subdomain called <your_server_name>
03:03 MTDiscord <e​xe_virus> players would join by typing in: <your_server_name>.minetest.land
03:04 MTDiscord <e​xe_virus> That's really the only major* issue with hosting at home
03:04 MTDiscord <e​xe_virus> The other problem is residential connections typically have worse upload speeds than VPS services online
03:05 MTDiscord <e​xe_virus> I think that's everything I have tips for
03:07 daiNoZord thanks - is that the same as ddns?
03:15 daiNoZord ah i think it is - it's a provider. Hey that's great! myserver.minetest.land - works for me :) Yeah I'm on a basic package and the speed isn't great.. VPS is the thing I've been trying to remember for the past couple of days - but I thought home-hosting as a trial if it's safe and then maybe see about hosting elsewhere if there's enough interest for it to be worth the cost
03:17 MTDiscord <e​xe_virus> Exactly
03:17 MTDiscord <e​xe_virus> I personally use genesisHosting. They have decent linux plans, roughly $3-4 a month
03:18 MTDiscord <e​xe_virus> (when you pay 6 months at a time, so like $27 for 6 months or something)
03:18 MTDiscord <o​neplustwo> ah yes, 4 * 6 is 27
03:19 daiNoZord That's good value - what's the speed like there? much lag?
03:26 daiNoZord $40 a year... about £2.50 pcm.
03:35 MTDiscord <e​xe_virus> Collection: taxes are included in that $27 ?  The speed is decent, lag is decent. I consider it a great baseline. I wouldn't host CTF on it or anything though. It flies for normal minetest gameplay with some mobs with maybe max 15 players. It seems to handle 3 factories running at once from techpack decently well. Not great, but playable at that point still.
03:52 daiNoZord I think I may need to trim down the amount of mods I use. Especially if I add things like realms and arenas
05:00 MTDiscord joined #minetest
05:08 DrFrankenstone joined #minetest
05:30 fluxflux_ joined #minetest
06:12 Flabb joined #minetest
06:17 majochup joined #minetest
06:39 est31 joined #minetest
06:46 DrFrankenstone_ joined #minetest
06:49 Bombo joined #minetest
06:49 MTDiscord1 joined #minetest
07:15 jetter joined #minetest
07:29 flux__ joined #minetest
08:00 ShadowNinja joined #minetest
08:31 mizux joined #minetest
09:05 dabbill_ joined #minetest
09:14 jetter joined #minetest
09:34 adfeno joined #minetest
09:45 longerstaff13 joined #minetest
09:45 proller joined #minetest
09:46 luk3yx joined #minetest
09:50 adfeno Hi there, is it possible to make bots that would show as players in /status and also on autocompletion, but not having entities nor occupying a server slot ?
09:51 DrFrankenstone joined #minetest
09:53 jetter joined #minetest
09:53 acvarium joined #minetest
10:05 jetter joined #minetest
10:06 FeXoR joined #minetest
10:08 calcul0n__ joined #minetest
10:21 rubenwardy You can customise server slots
10:21 rubenwardy User bypass
10:22 MTDiscord2 joined #minetest
10:37 adfeno rubenwardy: thank you, what about making bots/players with no physical entity?
10:37 rubenwardy Oh right, you mean object
10:37 rubenwardy Not possible currently
10:37 rubenwardy Is this a server you run?
10:37 adfeno Could be.
10:37 rubenwardy You could make them spectators
10:38 rubenwardy Or your could make them not players
10:38 adfeno spectators?
10:38 rubenwardy Making them not a player won't allow completion thought
10:38 rubenwardy !mod spectator
10:38 MinetestBot rubenwardy: Spectator Mode [spectator_mode] by jp - https://forum.minetest.net/viewtopic.php?t=13718 - https://github.com/minetest-mods/spectator_mode
10:40 adfeno Hm, mod spectator seems to require an existing player to watch.
10:42 rubenwardy which is what the bot player method would be
10:43 adfeno So make an entity that is not a player, and then make mod spectator watch that non-player entity ?
10:43 rubenwardy your two options are:
10:43 rubenwardy 1. Create a bot player using a tool like the one found on the forum. This connects as a player and would allow chat completion
10:43 rubenwardy 2. A Lua mod which pretends to be a player
10:43 rubenwardy Number 2 is probably better
10:44 rubenwardy it's better on resources and won't create an object
10:44 rubenwardy Also, btw - players and entities are the two types of obect. Nonplayer entity doesn't make sense, as all entities are not players
10:44 rubenwardy This is fairly minetest-specific terminology
10:45 adfeno rubenwardy: my goal is to make a Minetest to XMPP bridge to send/receive messages at both ends, optionally allowing natively listing room participants in both ends.
10:45 rubenwardy ahhh
10:45 rubenwardy Well, you want #2 then
10:45 ShadowBot https://github.com/minetest/minetest/issues/2 -- Burned wood
10:45 rubenwardy see the IRC mods
10:46 rubenwardy you won't be able to use chat completion currently, as there's no API For that yet :tm:
10:49 adfeno rubenwardy: what if I employ a mod to pretend to be a player but do nothing, then with other mod make the MT+XMPP bridge and make each user from this bridge watch the fake player?
10:49 rubenwardy you don't need to do that
10:49 adfeno (watch in the sense of mod spectator)
10:50 rubenwardy "pretend to be a player" -> you can just simulate chat messages and override /status
10:50 adfeno What about autocompletion ?
10:51 rubenwardy you can't do that without connecting to Minetest as an actual player, which would be very expensive
10:51 rubenwardy or you could modify the C++ cod
10:51 adfeno Hm, I see… very steep road it seems.
10:51 adfeno I would also be dealing with IrrLicht along the way too :S
10:53 adfeno I'll try to follow “override /status” and simulate chat messages then.
10:53 rubenwardy not related to Irrlicht, as it's server-side only
10:57 milkt joined #minetest
11:06 adfeno How to make players solid ?
11:08 rubenwardy collide_with_objects = true   in object properties
11:09 adfeno Hm, OK :)
11:12 adfeno Recently I also tried to use require("lua-script-from-lua-path") in a mod listed on secure.trusted_mods, but Minetest wouldn't let me. I know that from the error message I could set security.enable_security = false, but I wonder: is there any other way?
11:13 rubenwardy you need to use   ie.require
11:13 rubenwardy and never ever do  security.enable_security
11:15 adfeno With security.enable_security = true and security.trusted_mods = mod_name, tried in init.lua: local ie = minetest.request_insecure_environment(); ie.require("lua-from-lua-path") but got same error message about require.
11:15 rubenwardy this is typically because the mods use require as well, you should do
11:16 rubenwardy local tmp = require
11:16 rubenwardy require = ie.require
11:16 rubenwardy require("lua-form-lua-path")
11:16 rubenwardy ie.require = require
11:17 jetter joined #minetest
11:17 Peppy_ left #minetest
11:17 jetter joined #minetest
11:17 adfeno rubenwardy: shouldn't the last line be “require = tmp” ?
11:18 rubenwardy ah yeah
11:20 adfeno Ah, I see, thanks :)
11:22 Peppy joined #minetest
11:25 MinetestBot [git] rubenwardy -> minetest/minetest: ContentDB: Order installed content first (#10864) 82deed2 https://git.io/JtWNo (2021-01-28T11:24:36Z)
11:28 rubenwardy joined #minetest
11:29 jetter joined #minetest
11:39 adfeno Hm… strange, even with ie.require, some Lua modules can't find some others, even though I have these in LUA_PATH and LUA_CPATH, the same command works in Lua and LuaJIT, and both path variables are the same in Minetest's environment.
11:39 sagax joined #minetest
11:40 adfeno I don't know if this matters, but the part which doesn't work seems to use pcall(require, select( something-and-something
11:42 adfeno I did set the insecure environment's require function as global require before calling the now-modified require.
11:43 Peppy joined #minetest
11:43 adfeno Ah, I must inspect ie's package paths :)
11:47 proller joined #minetest
11:47 adfeno Well, ie's package.path and package.cpath are all OK as equal to Lua and LuaJIT, so I don't know where it's failing.
11:48 adfeno ie.package.path ie.package.cpath
11:48 adfeno s/where/why/
11:57 adfeno In the same error message there is also another erro for “module "encoding"” which I'm investigating and “encoding” seems to be a file which, as far as I know, should also be found in LUA_PATH.
12:00 rubenwardy joined #minetest
12:00 rubenwardy Are you using 5.4.0-dev?
12:03 adfeno rubenwardy: Minetest 5.3.0
12:03 adfeno Ah, I see, “module” itself isn't defined in insecure environment.
12:04 adfeno I'll try replacing it with ie.require and assigning that to a local variable.
12:06 adfeno Geess  I hate bundling, this XMPP is a must for my group but the most uptodate library seems to be bundling every kind of Lua it depends on, which has lots of old code (including those which use “module”)
12:07 proller joined #minetest
12:09 adfeno If things continue like this I'll ditch this verse library, install libstrophe from Guix (which unbundles everything), and hope to learn how to call that from Lua.
12:30 majochup joined #minetest
12:30 erlehmann joined #minetest
12:58 Fixer joined #minetest
13:06 Beton joined #minetest
13:15 minduser00 joined #minetest
13:33 ovalo joined #minetest
13:37 systwi joined #minetest
13:45 MDude joined #minetest
13:46 Bombo joined #minetest
13:46 ovalo joined #minetest
14:15 kamdard joined #minetest
14:37 olliy joined #minetest
14:58 Verticen joined #minetest
15:04 qj joined #minetest
15:05 fleeky_ joined #minetest
15:41 galex-713 joined #minetest
15:46 numzero joined #minetest
15:56 adfeno joined #minetest
16:10 milkt joined #minetest
16:28 adfeno rubenwardy: I think I found the issue, _G doesn't define module, but as far as I can see the insecure environment requested does.
16:38 TomTom joined #minetest
16:47 adfeno How to allow Lua code loaded from “require” to read /etc/resolv.conf ? I already requested insecure environment and used “require” from ie.
16:48 rubenwardy You could implement require yourself with a correct fenv
16:48 rubenwardy fenv is the problem
16:48 rubenwardy so if you can work out the path to the lua file
16:48 rubenwardy you can do   loadfile(path)   and then setfenv(func, ie)   on the result
16:48 rubenwardy then call it
16:48 rubenwardy require = find the path, run the path, cache the result, return result
16:50 adfeno Addendum: error message is : “Mod security: Blocked attempted read from /etc/resolv.conf”
16:50 rubenwardy yeah, that's because you're reading using the sandboxed env
16:54 rubenwardy made an issue   #10877
16:54 ShadowBot https://github.com/minetest/minetest/issues/10877 -- Insecure require() should set insecure env on file
16:57 adfeno rubenwardy: so call it like this? require=ie.require; setfenv(loadfile(path), ie)
16:57 rubenwardy don't need the require bit
16:58 adfeno So setfenv(loadfile(path), ie) is enough?
16:58 rubenwardy setfenv(loadfile(path), ie)()
16:58 rubenwardy the () calls it
16:58 adfeno Hm… I see
16:58 rubenwardy files are functions in Lua
16:59 adfeno What if the lua module itself uses “require” to load other modules ?
17:00 rubenwardy setfenv handles that
17:00 rubenwardy setfenv means that the file will use globals from ie
17:00 rubenwardy including the require
17:00 adfeno Hm… I see.
17:00 adfeno Thanks :)
17:07 Bombo joined #minetest
17:07 longerstaff13 joined #minetest
17:07 adfeno rubenwardy: in loadfile(path) you mean the script that is attempting to both call others with require and also trying to read /etc/resolv.conf, right ?
17:08 rubenwardy yeah
17:08 rubenwardy I mean the remove script as well
17:08 rubenwardy remote
17:08 rubenwardy like library script
17:08 rubenwardy if you're just trying to read resolv from a mod, you can do    ie.io.open
17:11 adfeno I tried this: local testing = setfenv(loadfile("/usr/local/share/lua/5.1/verse/init.lua"), ie)();        … but now it errors with: Mod security: Blocked attempt to read from "/usr/local/share/lua/5.1/verse/init.lua".
17:11 rubenwardy sorry,  ie.loadfile
17:14 MTDiscord <Z​ander_200> hi im in the IRC now
17:15 MTDiscord <o​neplustwo> oh dear
17:16 MTDiscord <Z​ander_200> what
17:17 Hawk777 joined #minetest
17:34 adfeno rubenwardy: strangely enough, doing        local verse_file = setfenv(loadfile(verse_init_file_path), ie); local verse = verse_file().init("client")      works fine, but most of the auxiliary functions seem to be nil
17:35 adfeno s/most of the auxiliary functions/most of the *verse* auxiliary functions/
17:40 adfeno Hm, I think I have an idea
17:50 adfeno Hm… no luck
18:12 Talkless joined #minetest
18:19 adfeno OK, I decided to abandon the XMPP bridge, no XMPP Lua library is maintainable in a system without bundling, and even so, all the ones I tried fail because them themselves forget to include stuff.
18:23 numzero joined #minetest
18:29 FeXoR joined #minetest
18:32 adfeno joined #minetest
18:35 proller joined #minetest
19:02 flux__ joined #minetest
19:16 Sven_vB joined #minetest
19:38 Krock !mod basic_materials
19:38 MinetestBot Krock: Basic Materials [basic_materials] by VanessaE - https://forum.minetest.net/viewtopic.php?t=21000 - https://gitlab.com/VanessaE/basic_materials
19:38 flux__ joined #minetest
19:51 adfeno joined #minetest
19:56 indiana joined #minetest
19:58 systwi_ joined #minetest
20:27 MinetestBot [git] numberZero -> minetest/minetest: Include irrlichttypes.h first to work around Irrlicht#433 (#10872) ed0882f https://git.io/Jtlgf (2021-01-28T20:25:13Z)
20:50 FeXoR joined #minetest
20:57 adfeno joined #minetest
21:02 flux__ joined #minetest
21:44 MinetestBot [git] rubenwardy -> minetest/minetest: Sanitize ItemStack meta text b5956bd https://git.io/JtlVg (2021-01-28T21:33:10Z)
21:53 Verticen joined #minetest
22:12 illwieckz joined #minetest
22:30 ovalo left #minetest
23:12 calcul0n_ joined #minetest
23:13 qjq joined #minetest
23:22 definitely_a joined #minetest
23:24 definitely_a joined #minetest
23:26 definitely_a joined #minetest
23:27 definitely_a Oops, clicked the wrong thing.
23:37 sibachian joined #minetest
23:37 daiNoZord can liguids be flammable? I tried flammable = 3, cools_lava = 0 and even -1 but apparently it ignored the "-"
23:42 daiNoZord tried to set my oil alight
23:45 definitely_a Hey I'm Knot Abbot
23:46 definitely_a How's it going? I just tried out IRC and I lov it.
23:58 Gustavo6046 joined #minetest

| Channels | #minetest index | Today | | Google Search | Plaintext