Skip to content

Allow ROOT flag to call public votes #1733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 12, 2022

Conversation

GabenManPowered
Copy link
Contributor

This patch allow ROOT flag to call votes even if a delay is set. Its nice to have the possibility to set a delay betweens votes to limit public votes. Generally, we do this when we have lots of admins. But as a ROOT flag this limit shall no be set.

This patch allow ROOT flag to call votes even if a delay is set. Its nice to have the possibility to set a delay betweens votes to limit public votes. Generally, we do this when we have lots of admins. But as a ROOT flag this limit shall no be set.
This patch allow ROOT flag to call votes even if a delay is set. Its nice to have the possibility to set a delay betweens votes to limit public votes. Generally, we do this when we have lots of admins. But as a ROOT flag this limit shall no be set.
@@ -406,8 +406,13 @@ void VoteSelect(Menu menu, int param1, int param2 = 0)

bool TestVoteDelay(int client)
{
if (CheckCommandAccess(client, "sm_vote_access", ADMFLAG_ROOT, true))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sm_vote_access seems a bit off as a name, and is probably going to clash with any future changes to vote cmds.
May I recommend sm_vote_delay_bypass, also the default flag for this shouldn't be the admin flag root but cvar, in order to line up with sm's sm_vote_delay convar as any admin with such permission could disable delays anyways. This will still allow root admins to bypass delays regardless.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed this is a duplicate of #1730, making a reference to it here so my comment can be relayed on both without having to send it twice.

@peace-maker
Copy link
Member

Duplicate of #1730
Please keep the conversation in one PR.

@peace-maker peace-maker closed this Apr 7, 2022
@GabenManPowered
Copy link
Contributor Author

GabenManPowered commented Apr 10, 2022

Hello, I was the originator of #1730 but I have lost my git account, so I have created a new one.

Can you reopen this PR and close the #1730 please ?

Then I can make the new update as proposed by @Kenzzer

Thanks

@GabenManPowered
Copy link
Contributor Author

Thanks for reopening this PR @asherkin

@Kenzzer, you can have a look, i have repalced flag ROOT with flag CVAR and set the command acces to sm_vote_delay_bypass

Copy link
Member

@asherkin asherkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

@asherkin asherkin merged commit 6e1f095 into alliedmodders:master Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants