How to install? - Easy
1. Download and install AutoHotkey
2. Add external_cmd mod to your server
3. Download minetest.ahk and edit path at 'minetest.ahk' F:\minetest\worlds\myworld\message >> D:\myserver\worlds\test\message
4. Start server and minetest.ahk
bingo!
P.S. To close script use 'escape' button
Last edited by bosapara on Wed Jun 05, 2019 18:23, edited 2 times in total.
good. another way is to use 'custom web server' software to pass incoming message to minetest (easily written in any language c++, rust,.. or nodejs) using minetest http_api. I made an example using my 'basic_robot' mod - you can write text in browser like: "http://address/your command"
and this almost instantly shows up in game: https://github.com/ac-minetest/basic_ro ... ebcommands
I wonder if it might be possible to use IPC with a named pipe or a non-blocking socket on Linux to communicate with the Minetest mods. That would probably be the most seamless and efficient, since it doesn't require opening and closing temporary files (which works, but is kind of a kludge).
Miniontoby wrote:It doesn't work by me, how does it usually works
How to install? - Easy
1. Download and install AutoHotkey
2. Add external_cmd mod to your server
3. Download minetest.ahk and edit path at 'minetest.ahk' F:\minetest\worlds\myworld\message >> D:\myserver\worlds\test\message (an example)
4. Start server and minetest.ahk
Miniontoby wrote:It doesn't work by me, how does it usually works
How to install? - Easy
1. Download and install AutoHotkey
2. Add external_cmd mod to your server
3. Download minetest.ahk and edit path at 'minetest.ahk' F:\minetest\worlds\myworld\message >> D:\myserver\worlds\test\message (an example)
4. Start server and minetest.ahk
But that is the problem / that doesn't work (I had tested "/sd" and that doesn't work)
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
minetest.register_chatcommand("kill", {
description = "Kill [player] or you",
param = "[player]",
-- privs = {hp = true},
func = function(name, param)
local target
local targetname
if param == "" then
target = minetest.get_player_by_name(name)
else
target = minetest.get_player_by_name(param)
end
local admin = minetest.setting_get("name")
if admin == nil then admin = "SERVER" end
if name ~= admin then
return
end
if target then
targetname = target:get_player_name()
target:set_hp(0)
minetest.chat_send_player(name, "Killed " .. targetname .. ".")
if minetest.setting_getbool("enable_command_feedback") then
minetest.chat_send_all(minetest.colorize("#7F7F7F", "[".. name ..": Killed ".. targetname ..".]"))
end
if math.random(1, 5) == 1 and minetest.setting_getbool("morecommands_enable_particles") then
easter_egg(targetname)
end
else
minetest.chat_send_player(name, minetest.colorize("#FF0000", "Player not found: " .. param))
end
end
})
arrangebizarre wrote:Doesn't work on my Windows 10
arrangebizarre, do you had done this in your PowerShell (Use [windows_key] + "X" and click on "Windows PowerShell") echo [message] > "<dir of Minetest>\worlds\<worldname>\message"
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"