[Mod] Server Cleaner [servercleaner]

Post Reply
User avatar
AiTechEye
Member
Posts: 920
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

[Mod] Server Cleaner [servercleaner]

by AiTechEye » Post

Image
Depends: none
Licenses: code: LGPL-2.1, media: CC BY-SA-4.0
Version: 1
Source
Download:
Supported mods: areas beds unified_inventory protector

This mod works with minetest 5.0.0 or newer


To keep the server working for a long time and its quality you need to maintenance it.

One thing that makes the maintenancing harder is are inactive players, they plays for a time, maybe just choosing another name or never returns, especially guests.

Old protected areas can be annoying for players, some small and doesn't protects anything useful at all or takes space that other players need, just messing up for the recurrent players, locked doors, chests takes less space, but are still annoying.

This mod will delete old players from the world database, auth, locked things like chests and doors, protected areas etc...

The current mod does:
Delete player: account, auth/privileges, areas, bed, unified_inventory-home, protectors
Unlock players locked chests/doors/trapdoor/bones
Cleans unknown blocks and entities automatically.
Giving you full power over your staff.
Removes nodes & objects you dont want

Supported/locked blocks are unlocked by lbm (when the blocks are loaded)

Commands:

/delplayer <name> delete a player requeres ban (and scadmin to moderators...)
/delme delete your self, type "/delme delete me" again to confirm
/delmod<name> Downgrade <name> to player requeres ban, scadmin or scmoderator privs...
/advm (manage "advanced members")
/clobjectschecks for unknown entities around you
/clonf nodes/entities filter

Privileges:
scguest (Guest) to all new players
scmoderator Can be downgraded to players by /delmod
scadmin Can downgrad moderators, but cant be downgraded/deleted by moderators
dont_delete Cant be deleted by commands or system

Time: event on server startup.
All new players gets scguest (Guest), will be deleted after 7 days if they hasn't returned.
Players will deleted after 365 days if they hasn't returned.
Moderators (has the scmoderator privilege) will be downgraded to players if they hasent returned in 90 days.

Auto cleaner
The mod lists all registered entities and nodes, if these are missing then those will be removed.
Players can also punch unknown nodes to add or do the /clobjects to add entities

ADVM
Just type /advm and you can see, and in a really easy way handle all of your staff.
It will show all players with odd privileges (compare with basic_privs)
Anyone that has the kick privilege can see this, but not all buttons.

Image

CLONF
Type /clonf and you can see and remove, all unknown nodes/entities.
You can also add existing to the filter.
unknown items removes from the filter, if those hasn't been been detected in 150 days (as default)
Requires scadmin to see this

Image
Attachments
screenshot_20181226_123253.png
(137.75 KiB) Not downloaded yet
screenshot_20181224_231809.png
(148.66 KiB) Not downloaded yet
screenshot_20181219_094928.png
(470.29 KiB) Not downloaded yet
Last edited by AiTechEye on Wed Dec 26, 2018 16:20, edited 30 times in total.

sofar
Developer
Posts: 2132
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod] Server Cleaner 0.7 [servercleaner]

by sofar » Post

Comments:

- please do not use CC0 for code. See viewtopic.php?f=3&t=21158

- Change the table at the top of the init.lua to use Settings.

- documentation on how it works. You register bunch of new privileges, this may conflict with other mods, as well. They have very generic names, too.

- documentation: /delmod isn't documented in this thread. Maybe a README.md can be helpful.

- /delme doesn't even ask for confirmation. You're going to give someone a bad time.

- https://github.com/AiTechEye/serverclea ... t.lua#L120 this whole line can just be replaced with `else`.

User avatar
sorcerykid
Member
Posts: 1572
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Server Cleaner 0.7 [servercleaner]

by sorcerykid » Post

Interesting concept, it seems like it could be useful for server operators.

Just a note, however, but to my knowledge LBMs are not reliable (unless that bug has been fixed). The only guaranteed way to modify all nodes in a map is to manipulate the database directly. An ABM with a chance of 1 and a very long interval could also potentially work, but the shortcoming is it only executes if mapblocks are loaded.

sofar
Developer
Posts: 2132
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod] Server Cleaner 0.7 [servercleaner]

by sofar » Post

sorcerykid wrote:Just a note, however, but to my knowledge LBMs are not reliable (unless that bug has been fixed). The only guaranteed way to modify all nodes in a map is to manipulate the database directly. An ABM with a chance of 1 and a very long interval could also potentially work, but the shortcoming is it only executes if mapblocks are loaded.
LBM has issues with new mapgen generated chunks, but that shouldn't matter for player placed blocks, of course.

The method of using an LBM with `run_at_every_load=true,` (which is what the code does) is actually a pretty good way of doing things.

The code seems to be doing the right thing though. At every block load, it looks at "owned" nodes and if the player owning those nodes no longer exists (because it was deleted) it removes the ownership.
sorcerykid wrote:Interesting concept, it seems like it could be useful for server operators.
Totally agreed - this looks very interesting and actually somewhat simple in how it works, so I'd love to see it gain some traction.

User avatar
AiTechEye
Member
Posts: 920
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

Re: [Mod] Server Cleaner 0.7 [servercleaner]

by AiTechEye » Post

you're right... and forgot to update the topic :)

but whats the problem with cc0 on code?
I want everyone able to use it, completely free of restrictions.

the other thing is, when you delete players,
players.sqlite doesn't shrink, deleted profiles doesn't even get overwrited, just unused.
Last edited by AiTechEye on Sun Dec 23, 2018 22:07, edited 1 time in total.

User avatar
TumeniNodes
Member
Posts: 2889
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [Mod] Server Cleaner 0.7 [servercleaner]

by TumeniNodes » Post

AiTechEye wrote:you're right... and forgot to update the topic :)

but whats the problem with cc0 on code?
I want everyone able to use it, completely free of restrictions.

the other thing is, when you delete players,
players.sqlite doesn't crawl, deleted profiles doesn't even get overwrited, just unused.
I used cc0 in the beginning as well, as well as Unlicense, unfortunately these do not provide the sort of freedom you think they do. at least with code

What I mean is, the variants of CC licenses, are mainly geared toward creative/art/media, not code
CC has this suggestion if using with code
https://wiki.creativecommons.org/wiki/C ... ntation.3F

Give a read of the thread sofar linked, it's worth it
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am

User avatar
AiTechEye
Member
Posts: 920
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

Re: [Mod] Server Cleaner 0.8 [servercleaner]

by AiTechEye » Post

ok, got it

User avatar
AiTechEye
Member
Posts: 920
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

Re: [Mod] Server Cleaner [servercleaner]

by AiTechEye » Post

just updating this topic to make sure someone knows this mod exist, before it disappearing in the amounts.

Note the mod is using features from next minetest release.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Server Cleaner [servercleaner]

by FreeGamers » Post

This mod has saved my butt a few times after trying out some mods on a server and dumping them. I've just started using it but I can tell its well made and versatile. Thanks!
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
ulla
Member
Posts: 111
Joined: Wed Feb 04, 2015 09:22
GitHub: IIIullaIII
IRC: ulla
In-game: ulla

Re: [Mod] Server Cleaner [servercleaner]

by ulla » Post

This mod works well and is simple to understand how it works, it does its job of removing old nodes and entities
only one thing I do not understand, often, it eliminates players saying that it has been a year since they have connected, 365 days but in reality, it has not been a month, my doubt is whether we mean 365 real days, or ingame days? or I have to change the parameter 365 to 36500 :-P for the rest mod useful for a server
X4cna2d4UqsiawIzUumDgPoYNx3JLGII

User avatar
Clyde
Member
Posts: 161
Joined: Sat Jul 30, 2016 14:23
GitHub: acmgit
In-game: clyde

Re: [Mod] Server Cleaner [servercleaner]

by Clyde » Post

The idea behind this mod is good.
The mod works really good, sometimes to good.

For me, the mod deletes to fast without asking, this is the reason, why i have uninstalled it form my server.

Automatic delete of player, it's ok.
But deleting without asking could be end in a desaster.

Automatic delete of unknown blocks, looks good, but only for lazy admins, like i was.
Why? I will show you a case, what happened on my server, but don't forget, my fault, my damage:

I logged in on my server, and getted the Message, the servercleaner has deleted this and this user ....
The user now gone, i can't take a look, who was this user, is there a reason i know, why the user wasn't the last 30 day's here or was it ok to delete it?
Good, my fault, my damage.

Next time, i installed a new mod and the mod has broken some dependence, so that some mods were not loaded, what the world need. Ok, this, we know, ends in unknown blocks ...
The servercleaner has started his work and it works really good, it clears my world from unknown blocks. The silly thing was, the mods were not loaded, because the new mod has broken the dependence, in a normal start, they would be load and nothing happens.
My fault, my damage, i know, i have to do this on a test-server, but i haven't done it, i have learned from it and uninstalled the otherwise good tool and try to keep my server clean by hand.

Perhaps you could add some security measures for lazy admins, especially on deleting something ;-).

Greetings, Clyde.

Post Reply

Who is online

Users browsing this forum: DoyleChris and 2 guests