Jump to content

Admin Command to Disable/Enable the demote function


UrdnotWrex

Recommended Posts

 

Description: Admin/Mod command called /disabledemote or /enabledemote (if admin is going AFK) to prevent players from using the /demote function when staff is online. Additionally, have it auto-enable when nobody is online with a staff flag.
	Reasoning: A mistake that I frequently see (and I'll admit, I did this myself just the other day) is using the /demote command when a staff member is online. I'll frequently see staff calling out NOT to use the command in OOC, or even discipline players (I'm guilty there) because someone broke the /demote rule, even if the reason is sound. Hoping to alleviate a little bit of staff headache over misuse of the command and prevent players from breaking the rules, perhaps it may help to have an admin only enable/disable command. At the very least, it would prevent rule-defying action from occurring.

	Additional Information: N/A. Unfortunately, I don't have any programming experience and so I don't know how difficult this would be to code.

Please poke holes into this idea! Perhaps you think this is an unnecessary command, subject to abuse, or may cause unintended issues - I'd love to hear it.
Edited by UrdnotWrex
Grammar
Link to comment

+1

I like the general idea, how are you supposed to know when staff are there? Instead of disabling it, there should be a way to just see if any staff are active. It is a good idea at its core

Edited by Freakit
  • Agree 1
Link to comment
15 minutes ago, Freakit said:

I like the general idea, how are you supposed to know when staff are there? Instead of disabling it, there should be a way to just see if any staff are active. I will +1 anyways, because it is a good idea at its core

Totally a good call out. Maybe an iterative version would be a pop-up saying:

 

"Are you sure you want to demote PERSON? The following staff are online

- Staff A 

- Staff B 

Demoting a player with staff on duty is against the rules and may result in punishment."

 

 

 

 

 

 

 

Edited by UrdnotWrex
  • Like 1
Link to comment

MAJOR +1

i've seen people who broke rules/are about to get banned demote staff so they can only be on citizen for 5 minutes just to mess with them a little bit more and i think removing the ability to do this when staff are active would be a good idea.

  • Like 1
Link to comment
5 hours ago, JackJJ said:

-1 Not many people demote while staff are online, and if they do, just tell them not to or warn them. Seems like too much work for an insignificant problem.

Definitely respect -- I just don't think I agree. But I'll absolutely defer to you and staff to comment on how annoying/frequent it may be. If it's rare, then sure it may just be over-solutioning for a minor problem.

I counted several instances of misuse of the /demote command during one day alone (I believe 7-8 hours of my active playtime), meaning at worst it could happen hourly. I just messaged an old friend who used to a code Lua for a server back in the day, and he told me it wouldn't take a lot of code to script. If that's true, what's the pitfall of making a prohibited action preventable?

Again, perhaps this is merely an anomaly and my assessment is way off -- just spitballing ideas so idiots like me don't make the same mistake twice 🙂 . I'll reach out to see if I can get a sample script to alleviate the amount of work involved.

Edited by UrdnotWrex
Link to comment
3 hours ago, UrdnotWrex said:

I just messaged an old friend who used to a code Lua for a server back in the day, and he told me it wouldn't take a lot of code to script. If that's true, what's the pitfall of making a prohibited action preventable?

To make this command useful, you'd have to provide access to it for every staff member since most of the time, it's a lower ranking staff member who's the last staff member to go AFK. If they forgot to reenable demotes, then for a period of time, nothing could be done about false warrants, false arrests, false raids with NLR, etc. Demotes give people the opportunity to temporarily solve problems while staff are gone, and if a staff member forgets to turn it back on, then chaos ensues.

  • Agree 1
Link to comment
9 hours ago, JackJJ said:

Not many people demote while staff are online

+1 

This does sound like an interesting concept but Garnet would have to write the code or have a developer write the code if there’s not a code set up already for an add-on like that.  
 

And Jack with my almost 300 or 400 hours on darkRP I’ve seen that alot where people will demote the mayor because he’s making laws they don’t like or doesn’t know a police officer because he’s arresting them for the all that the mayor has put in place or their rating and they don’t like it because I get arrested.

Link to comment
6 hours ago, UrdnotWrex said:

Definitely respect -- I just don't think I agree. But I'll absolutely defer to you and staff to comment on how annoying/frequent it may be. If it's rare, then sure it may just be over-solutioning for a minor problem.

I counted several instances of misuse of the /demote command during one day alone (I believe 7-8 hours of my active playtime), meaning at worst it could happen hourly. I just messaged an old friend who used to a code Lua for a server back in the day, and he told me it wouldn't take a lot of code to script. If that's true, what's the pitfall of making a prohibited action preventable?

Again, perhaps this is merely an anomaly and my assessment is way off -- just spitballing ideas so idiots like me don't make the same mistake twice 🙂 . I'll reach out to see if I can get a sample script to alleviate the amount of work involved.

 

2 hours ago, JackJJ said:

To make this command useful, you'd have to provide access to it for every staff member since most of the time, it's a lower ranking staff member who's the last staff member to go AFK. If they forgot to reenable demotes, then for a period of time, nothing could be done about false warrants, false arrests, false raids with NLR, etc. Demotes give people the opportunity to temporarily solve problems while staff are gone, and if a staff member forgets to turn it back on, then chaos ensues.

The simplest solution isn't to make a command to toggle, but to just virtually disable the command when staff are online.

I couldn't write out the code as I don't know anything about D3A (specifically whether or not it uses Gmod usergroups, since not all admin addons do) but it wouldn't be difficult whatsoever.

Quote

-- Based on the most recent version of DarkRP, available on GitHub
-- You can find the Demote command's function on line 285 of darkrp/gamemode/modules/jobs/sv_jobs.lua

STAFF_USERGROUPS = {
	["moderator"] = true
	-- fill in with rest...
}

local function IsStaffOnline()
	-- if a function like this already exists, use it instead
	local staffOnline = false
	for id, ply in ipairs(player.GetAll()) do
		if STAFF_USERGROUPS[ply:GetUserGroup()] then
			staffOnline = true
			break
		end
	end
  
	return staffOnline
end

local function Demote(ply, args)
	if IsStaffOnline() then
		DarkRP.notify(ply, 1, 4, "You are unable to demote a player when staff are online.")
	end
	-- rest of the demote function unchanged
end

 

 

@JackJJ does present another problem, however. What if a staff member joins and goes AFK? Then players can't use the demote function (which was created for this purpose) to temporarily solve these problems without a staff member present. And that is a very fair thing to consider since (I'm assuming it's the same on DRP as MRP) AFK farming credits and such is allowed.

Edited by Fier
Added code example
  • Informative 1
Link to comment
19 minutes ago, Fier said:

 

The simplest solution isn't to make a command to toggle, but to just virtually disable the command when staff are online.

I couldn't write out the code as I don't know anything about D3A (specifically whether or not it uses Gmod usergroups, since not all admin addons do) but it wouldn't be difficult whatsoever.

 

@JackJJ does present another problem, however. What if a staff member joins and goes AFK? Then players can't use the demote function (which was created for this purpose) to temporarily solve these problems without a staff member present. And that is a very fair thing to consider since (I'm assuming it's the same on DRP as MRP) AFK farming credits and such is allowed.

Thanks for providing your context on the feasibility!

@JackJJ definitely brings up a good point regarding AFK staff, and to that point: What about the iteration I mentioned above where the user is prompted with a confirmation if an admin flag is present on the server?

 

20 hours ago, UrdnotWrex said:

Totally a good call out. Maybe an iterative version would be a pop-up saying:

 

"Are you sure you want to demote PERSON? The following staff are online

- Staff A 

- Staff B 

Demoting a player with staff on duty is against the rules and may result in punishment."

 

 

 

 

 

 

 

Edited by UrdnotWrex
Link to comment

We have almost 90 staff and its almost impossible to have no staff online. Its even very rare for all the staff to be idle. Even considering late hours like 4am-8am we still have active staff.

We should just disable it entirely since it is misused 99% of the time.

Link to comment
Just now, proggy said:

We have almost 90 staff and its almost impossible to have no staff online. Its even very rare for all the staff to be idle. Even considering late hours like 4am-8am we still have active staff.

We should just disable it entirely since it is misused 99% of the time.

It should 100% be disabled. It's rarely used and when it is it's used in the wrong way

Link to comment
11 minutes ago, proggy said:

We have almost 90 staff and its almost impossible to have no staff online. Its even very rare for all the staff to be idle. Even considering late hours like 4am-8am we still have active staff.

We should just disable it entirely since it is misused 99% of the time.

+1 on Proggy's comment -- this may just be the easiest solution. And it hits the root problem statement of people misusing the /demote command.

Edited by UrdnotWrex
Link to comment
  • 3 weeks later...

 

logo.png.e5b1f1407eab24395fffa930c7633c1 

Your suggestion has been Accepted,

While we will not make a command to Disable/Enable the demote function, but rather disable it completely since we do now have a rather large staff team.

Please note that accepted suggestions will not necessarily be implemented into the server, but rather forked over to the development team for a second opinion, at which point they are free to choose between implementation or not.

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use | Guidelines