[Mod] outgame intervention [outgame_intervention]
- Hybrid Dog
- Member
- Posts: 2828
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
[Mod] outgame intervention [outgame_intervention]
This mod allows you to let minetest execute a .lua file which you just created.
By default it runs code from a file called "tmp.lua" at your worldpath, which you need to create yourself.
You can e.g. kick this player called "admin":
* go to the folder of the world which is used
* add the tmp.lua file
* open it with a texteditor
* write minetest.kick_player("admin", "Why do you use such a name? We all know that you are not a real admin.")
* save it, e.g. by pressing ctrl+s
* be happy that it worked
l put these links here
http://dev.minetest.net/Category:Methods
http://dev.minetest.net/minetest.chat_send_all
http://dev.minetest.net/minetest.request_shutdown
http://dev.minetest.net/minetest.kick_player
License: WTFPL
Download: zip, tar.gz
github: outgame_intervention
If you got ideas or found bugs, please tell them to me.
How to install a mod?
By default it runs code from a file called "tmp.lua" at your worldpath, which you need to create yourself.
You can e.g. kick this player called "admin":
* go to the folder of the world which is used
* add the tmp.lua file
* open it with a texteditor
* write minetest.kick_player("admin", "Why do you use such a name? We all know that you are not a real admin.")
* save it, e.g. by pressing ctrl+s
* be happy that it worked
l put these links here
http://dev.minetest.net/Category:Methods
http://dev.minetest.net/minetest.chat_send_all
http://dev.minetest.net/minetest.request_shutdown
http://dev.minetest.net/minetest.kick_player
License: WTFPL
Download: zip, tar.gz
github: outgame_intervention
If you got ideas or found bugs, please tell them to me.
How to install a mod?
- Attachments
-
- 2014-12-22-142819_1280x1024_scrot.png (14.72 KiB) Viewed 815 times
Last edited by Hybrid Dog on Thu May 26, 2016 10:15, edited 7 times in total.
-
- Member
- Posts: 356
- Joined: Thu May 08, 2014 21:22
- GitHub: Maddie-Myina
- IRC: Maddie-Myina
- In-game: .
- Location: Far Eden
Re: [Mod] outgame intervention [outgame_intervention]
Yeah nicely done.
But would be cool can make an Temporary Mod. Like few new tools or something. Maybe an Signature mod per World/Server.
That if can have it work and run the textures and all.
Haven't tested yet.
But would be cool can make an Temporary Mod. Like few new tools or something. Maybe an Signature mod per World/Server.
That if can have it work and run the textures and all.
Haven't tested yet.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.
- Hybrid Dog
- Member
- Posts: 2828
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: [Mod] outgame intervention [outgame_intervention]
you can put mods into <world>/worldmods/ to have it only for this worldAlt. Tester wrote:But would be cool can make an Temporary Mod. Like few new tools or something. Maybe an Signature mod per World/Server.
That if can have it work and run the textures and all.
- ExeterDad
- Member
- Posts: 1717
- Joined: Sun Jun 01, 2014 20:00
- In-game: ExeterDad
- Location: New Hampshire U.S.A
Re: [Mod] outgame intervention [outgame_intervention]
So in theory. If this mod was installed on a remote server, could one echo or use cat via a ssh shell and run commands the same way?
HOMETOWN -Our little server. Keep the HOMETOWN chatter @ http://hometownserver.com - Our server map: http://media.hometownserver.com
- Hybrid Dog
- Member
- Posts: 2828
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: [Mod] outgame intervention [outgame_intervention]
He/she would need e.g. to use nano and edit/create the tmp.lua file.ExeterDad wrote:So in theory. If this mod was installed on a remote server, could one echo or use cat via a ssh shell and run commands the same way?
$ cd <worldpath>
$ nano
write minetest.chat_send_all("hello, players")
ctrl+o
write tmp.lua
enter
…
- ExeterDad
- Member
- Posts: 1717
- Joined: Sun Jun 01, 2014 20:00
- In-game: ExeterDad
- Location: New Hampshire U.S.A
Re: [Mod] outgame intervention [outgame_intervention]
so just as long as the command is written to the tmp.lua file...
the mod will repeatedly check the file and execute whatever command is written there?
So from a shell:
Would write the command to the file and it should be read. This is freaking huge! Scripts can be written, data collected, and all kinds of stuff can be done automagically!
I am pretty excited. You opened some doors with this script :D
the mod will repeatedly check the file and execute whatever command is written there?
So from a shell:
Code: Select all
lee@my-linux-server ~ $ echo 'minetest.chat_send_all("hello, players")' > /path/to/worldfolder/tmp.lua
I am pretty excited. You opened some doors with this script :D
HOMETOWN -Our little server. Keep the HOMETOWN chatter @ http://hometownserver.com - Our server map: http://media.hometownserver.com
- Hybrid Dog
- Member
- Posts: 2828
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: [Mod] outgame intervention [outgame_intervention]
It repeatedly checks the file and if it's not empty, it executes it and makes it empty that the file gets executed only one time. If you want to have iterations, just use lua iterations, you can also add a new globalstep function.ExeterDad wrote:so just as long as the command is written to the tmp.lua file...
the mod will repeatedly check the file and execute whatever command is written there?
Take care that you don't write a typo, else minetest(server) would crash(shutdown), l think.
The doors weren't locked before.ExeterDad wrote:I am pretty excited. You opened some doors with this script :D
- ExeterDad
- Member
- Posts: 1717
- Joined: Sun Jun 01, 2014 20:00
- In-game: ExeterDad
- Location: New Hampshire U.S.A
Re: [Mod] outgame intervention [outgame_intervention]
Well you turned on a light bulb for me :)Hybrid Dog wrote: The doors weren't locked before.
HOMETOWN -Our little server. Keep the HOMETOWN chatter @ http://hometownserver.com - Our server map: http://media.hometownserver.com
- Krock
- Developer
- Posts: 4649
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: [Mod] outgame intervention [outgame_intervention]
It's easy to crash a server by saving something incomplete.
It would be cool if it's possible to add something like a try {} catch {} around the dofile() part.
It would be cool if it's possible to add something like a try {} catch {} around the dofile() part.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- Hybrid Dog
- Member
- Posts: 2828
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Who is online
Users browsing this forum: No registered users and 24 guests