I made a module for myself that lets me easily note, kick and ban players, but I decided to add more to it and release it for everyone to benefit from it. If there are any problems, I’ll try to address them as soon as I can.
How to use
This module is supposed to be used to note down problems with server code e.g. when an event is fired and things don’t add up. You can note the problem down easily and kick/ban if u have to, so it’s nothing like HD admin or anything similar.
I have added a Script that sets up the module for you and also grants moderators access to Chat Commands. To use the module itself in your code, all you have to do is require it. Make sure you are only using the module on the server.
local Watchdog = require(path)
local ServerModeratorId = -1 -- moderator id of -1 is reserved for the server
game:GetService("Players").PlayerAdded:Connect(function(player)
Watchdog.Note(player, ServerModeratorId, "Testing")
end)
Honestly, this is a module we didnt know we needed. One of my biggest pain in the ass was handling moderators, which slowed down my development of my admin system, so thanks
You’ve done a fabulous job creating this. This does make life easier for us developers since we are stressed about getting the other parts of the games done, and we don’t focus much on how we manage our game.
However, I recommend using another system for managing your commands rather than using if & else if statements. Even though it works, it is harder to modify in the future. I recommend using a module script that holds all the commands with command descriptions and whatnot, so it’s all in one place and handled with another external hand.
Right, I agree with you. I did do that for other parts of my code; I just left that one large if elseif block as some people that reviewed my code told me to do so. I will probably change that in future updates. I appreciate your advice.
Maybe consider adding a LocalNote, which would only save the logs on the server, and not save, so you have saving logs, and non-saving logs. Otherwise, very interesting module, I’ll definitely check it out.
See, im confused is this for security for building a framework around a admin-panel?
It seems like for a admin-panel, but you state otherwise and could it technically be used for a admin-panel.
It can definitely be used for an admin panel, but that isn’t what this is designed for. This module is intended to be used for resolving or noting down issues that arise in your code; not for giving yourself noclip or other features of dedicated admin panels.
For example, let’s say you have an item in your game that grants the player coins when used, but it has a cooldown of 1 minute between each use. Then on the server, you realise that the item is being used when it should have still been on cooldown, with this module, you can create a note on that player and choose to kick or ban them if you want.
This module has some potential, my biggest complaint is that its currently not very open, its written around the chat commands and its a tedious and annoying task to remove that aspect of it. I think maybe writing a “Watchdog Lite” version of the module that handles the player verification, warns, bans etc without having the chat functionality built in would be beneficial.