Catching griefers
Griefers can be hard to catch, because they usually do their thing when nobody else is online, and the server doesn't log what players do. The server does print out what blocks are broken and by who. I've been trying to figure out a good way to save this information to catch griefers.
stderr output (which contains information about broken blocks) can be saved to a file by launching minetest like this:
The output seems to be written instantly. It saves ALL stderr output, including placing blocks and mob spawns. Would this make the file to big?
If that causes too much output, lines about someone digging can be pulled out by launching like this:
The output seems to be only written completely when minetest is closed. Also, could this use up the computer's memory if used for too long?
Whichever way, the file can be searched like so:
where "coords" is the coordinates of a block that was removed from a griefed building.
Sorry if these commands sound stupid, I don't know much about bash and came up with this in 10 minutes. Would something like this work on a server without making an insanely huge log file?
stderr output (which contains information about broken blocks) can be saved to a file by launching minetest like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest 2> log.txt
The output seems to be written instantly. It saves ALL stderr output, including placing blocks and mob spawns. Would this make the file to big?
If that causes too much output, lines about someone digging can be pulled out by launching like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest 2>&1 | grep digs >> log.txt
The output seems to be only written completely when minetest is closed. Also, could this use up the computer's memory if used for too long?
Whichever way, the file can be searched like so:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
cat log.txt | grep 'digs (coords)'
where "coords" is the coordinates of a block that was removed from a griefed building.
Sorry if these commands sound stupid, I don't know much about bash and came up with this in 10 minutes. Would something like this work on a server without making an insanely huge log file?