I’m trying to make private server owners have moderator permissions in Adonis for the game I’m working on. I currently have the following extra lines in the Settings ModuleScript, and it’s a bit of a hack:
settings.Moderators = {}
if game.PrivateServerId ~= "" then
if game.PrivateServerOwnerId ~= 0 then
table.insert(settings.Moderators, game.PrivateServerOwnerId)
end
end
this works except for the fact when an administrator unmods a private server owner, they lose their moderator permissions forever.
Is there any way around this (or a better way of doing private server moderators)?
How? Adonis is an opensourced and extremely powerful admin commands script and doesn’t “break peoples game”. And, the creator of adonis (@Sceleratis) is a trusted member of the devforum.
Also, @HiroyukiSawano_nZk here’s what might be a solution to your problem.
In the settings module, there is an API section that looks something like this:
settings.Allowed_API_Calls = {
Client = false; -- Allow access to the Client (not recommended)
Settings = false; -- Allow access to settings (not recommended)
DataStore = false; -- Allow access to the DataStore (not recommended)
Core = false; -- Allow access to the script's core table (REALLY not recommended)
Service = false; -- Allow access to the script's service metatable
Remote = false; -- Communication table
HTTP = false; -- HTTP related things like Trello functions
Anti = false; -- Anti-Exploit table
Logs = false;
UI = false; -- Client UI table
Admin = false; -- Admin related functions
Functions = false; -- Functions table (contains functions used by the script that don't have a subcategory)
Variables = true; -- Variables table
API_Specific = true; -- API Specific functions
}
You should change “Admin” to true
settings.Allowed_API_Calls = {
Client = false; -- Allow access to the Client (not recommended)
Settings = false; -- Allow access to settings (not recommended)
DataStore = false; -- Allow access to the DataStore (not recommended)
Core = false; -- Allow access to the script's core table (REALLY not recommended)
Service = false; -- Allow access to the script's service metatable
Remote = false; -- Communication table
HTTP = false; -- HTTP related things like Trello functions
Anti = false; -- Anti-Exploit table
Logs = false;
UI = false; -- Client UI table
Admin = true; -- Admin related functions
Functions = false; -- Functions table (contains functions used by the script that don't have a subcategory)
Variables = true; -- Variables table
API_Specific = true; -- API Specific functions
}
Which allows you to change the admins from a plugin.
Next, you’re going to want to make a server plugin. (Always begins with Server: )
And add this code, which gives the VIP Server Owner temporary admin:
server = nil -- Mutes warnings about unknown globals
service = nil
return function()
if game.PrivateServerId == "" then return end
service.HookEvent("PlayerJoined", function(player)
if player.UserId ~= game.PrivateServerOwnerId then return end
server.Admin.AddAdmin(player, 1, true) -- temporary moderator
end)
end
I don’t think Adonis has an intended backdoor, but there are people that say Adonis has some vulnerabilities that allow for server-sided exploits. I looked through some Adonis code, like the avatar editor stuff, and it doesn’t seem to have any vulnerabilities. Probably just a myth.
Personally, I’ve done a lot of work with the Adonis source code, and I know it very well. I know for a fine fact that there is no malicious code at all.
That is, provided you are using the official Module and Loader.
Adonis is an open source module, any ‘virus’ or ‘backdoor’ would be easily removable. That being said, the standard version of Adonis contains no backdoors or viruses. There are plenty of copy version uploaded that do contain malicious entries, I would advise seeing who the owner of the model is first before using.
Why are you after me ~3 years later This was already addressed years ago in the previous posts. At the time of writing my post, it was during the time backdoors were rampant. Times have changed and it’s a lot more secure with the new barriers Roblox has added, backdoors have been harder to implement.