BatchExec
#1
This plugin allows admins to execute batches of console commands that are read from a file.

Source, download: https://github.com/madmaxoft/BatchExec

Console commands:
- batchexec <filename> - read the specified file, line by line, and execute each line as a console command
Reply
Thanks given by: sphinxc0re , NiLSPACE , DrMasik
#2
Is it possible that this would be expanded? That users could also use this. For example in the Gallery server to set the correct hitbox I currently have to use: "/ge bb show", "//expand 1 walls" and then "//expand -1" while looking away from the door. If I could simplify it by using something like "/batch hb" or "/b hb" it would speed up the process a little Smile
Reply
Thanks given by:
#3
There's a problem of defining the batches, if you want to make that user-configurable, too (instead of reading files, a DB should be used, probably).
I'm quite unlikely to do that, though, but feel free to submit a PR Smile
Reply
Thanks given by:
#4
How about not making it possible to do add batches in-game, but that I make an web-admin interface where admins can add and edit the batch files?
Reply
Thanks given by:
#5
(10-19-2015, 03:54 AM)NiLSPACE Wrote: How about not making it possible to do add batches in-game, but that I make an web-admin interface where admins can add and edit the batch files?

sounds good
Reply
Thanks given by:
#6
Sounds good, but then you'd need to include a storage for the batches (most likely SQLite) with proper sequencing of the commands (one command per record? or one batch per record?)
Reply
Thanks given by:
#7
I had a folder in the BatchExec's folder in mind. I don't really expect admin's to create more than a few of them.
Reply
Thanks given by:
#8
That could be tricky to set up correctly. Anything in the filesystem can be vulnerable to various attacks:
Code:
/batchexec c:\windows\system32\win.ini
/batchexec ../../../settings.ini
/batchexec .\../..\../settings.ini
Reply
Thanks given by:
#9
That could be fixed by something like this + (Path):match("^%w:\\")
Reply
Thanks given by:
#10
That code is wrong, these paths will get through it:
Code:
../../.././settings.ini
\\server\share\settings.ini
This just shows how difficult it is to secure things properlyTongue So it might just be a better idea to actually use sqlite Smile
Reply
Thanks given by:




Users browsing this thread: 4 Guest(s)