-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Add ban user by id command /banid
#4411
Add ban user by id command /banid
#4411
Conversation
@@ -2829,6 +2829,54 @@ void CommandController::initialize(Settings &, Paths &paths) | |||
return ""; | |||
}); | |||
|
|||
this->registerCommand("/banid", [formatBanTimeoutError]( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open to other suggestions for the command name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this name is fine for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality seems to work as I would expect it to 👍
@@ -2829,6 +2829,54 @@ void CommandController::initialize(Settings &, Paths &paths) | |||
return ""; | |||
}); | |||
|
|||
this->registerCommand("/banid", [formatBanTimeoutError]( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this name is fine for me
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpicks, haven't tested functionality yet but it looks simple enough 👍
Maybe special syntax could be made so all |
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
If relevant use-cases come up in the future, we'll figure out a uniform solution for this that can be applied to all commands but for now we'll go with this simple one that has an actively request use-case. |
/banid
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
With the
/ban
command migrated to Helix, we are no longer able to ban suspended or deactivated accounts because helixgetUsers
is not able to resolve theuser_id
associated with the login name. However, if a moderator already knows theuser_id
, helixbanUser
is able to ban the account, even if suspended or deactivated. Thus, this PR adds a/banid
command to allow banning users by id.Note: similar concerns apply for timeout/unban, but are not covered by this PR (and are not as important imo)