Skip to content
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

Unhardcode server-pick input lists in bans #6302

Merged
merged 1 commit into from Oct 29, 2021

Conversation

pali6
Copy link
Member

@pali6 pali6 commented Oct 14, 2021

About the PR

Replaces hardcoded lists of servers when (job)banning people with lists generated from the new /datum/game_servers object. As a side effect this allows per-server banning on Nightshade servers etc.

Note that this depends on goonhub actually supporting this per-server banning of Nightshade. I assume that's supported but am not sure.

Why's this needed?

Hardcoding stuff is bad because when a new server gets added etc. we'd have to modify all those hardcoded occurences manually instead of modifying the central config.

Changelog

No changelog.

@pali6 pali6 added the C-Code-Quality Cleans up code, refactors things to be more readable or intuitive label Oct 14, 2021
@github-actions github-actions bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 14, 2021
pick_list["All"] = "all"
for(var/id in src.servers)
var/datum/game_server/server = src.servers[id]
if(public_only && !server.publ)
Copy link
Member

Choose a reason for hiding this comment

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

i was really confused on what pub1 was until i realized it said publ for public - do we really need to be saving two characters for this

Copy link
Member Author

@pali6 pali6 Oct 15, 2021

Choose a reason for hiding this comment

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

Compiler/linter yells that public is a reserved word if you use public.

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess I could name it is_public? Here's the error that DM yells about btw
image

Copy link
Member Author

Choose a reason for hiding this comment

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

Out of the scope of this PR however. 😌

@pali6 pali6 merged commit cd4a63f into goonstation:master Oct 29, 2021
@pali6 pali6 deleted the dynamic-server-lists-for-bans branch October 29, 2021 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Code-Quality Cleans up code, refactors things to be more readable or intuitive size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants