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

Replace all joinsas with joinas spec #614

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

L-e-x-o-n
Copy link
Collaborator

!joinas allows players to join as another player or spectator in an active games, unfortunately it has been used by some players to join as other players without their approval and sabotage them. There was code in place that was supposed to replace all !joinas commands with !cv joinas which would call a vote when calling the command, however this code only covered the lowercase !joinas, it could be bypassed by different word capitalisations (e.g !joinAs).
These changes fix this and furthermore replace all !joinas command variants with !joinas spec, no longer allowing joining as another player.

cmd
|> String.trim()
|> String.downcase()
|> case do
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh, didn't know you could do |> case do that's neat

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.

2 participants