Private server moderators in Adonis

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)?

6 Likes

Don’t really recommend Adonis as it is known for having people break their games.

Isn’t there a setting in the Adonis Configuration module that allows you to grant admin permissions to users that own VIP servers?

1 Like

I disagree. Yes, there are abusive commands, but it is easy to change the permission levels for commands.

I’d recommend looking into this. This is what i was talking about: Does Adonis contain a virus?

How? Adonis is an open sourced 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
13 Likes

Adonis is open sourced. It doesn’t contain any malicious code.

1 Like

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.

1 Like

I personally don’t use Adonis, however, that is what i’ve seen.

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.

3 Likes

From personal experiences, Adonis is usually my to go. Never experienced problems with it.

2 Likes

Your code worked, but I had to replace this section with game.Players.PlayerAdded:Connect(function(player) ... end).
Thanks a bunch!

3 Likes

This doesn’t seem to work for me. I must be doing something wrong or ROBLOX changed something

Edit: I managed to get it to work with some experimenting.

1 Like

You have to set Service in to true in AllowedAPICalls to true

Service = true;
1 Like

Have never had this happen, been using adonis for almost 5 years now. Have never had an issue with my games.

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 :sob: 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.

3 Likes

Ngl I didn’t see the year lol it just popped up on my feed so I responded, oops!

2 Likes

I don’t think Adonis is bad. I always use it in my games, and never experienced any problems.