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

Don't require commands be uppercase when using !cmd #1823

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

tadzik
Copy link
Contributor

@tadzik tadzik commented Sep 12, 2024

Split off from #1807, credit to @funderscore1

Ferass El Hafidi and others added 3 commits September 12, 2024 13:11
when using `!cmd`

IRC commands can be lowercase.

Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
@tadzik tadzik requested a review from a team as a code owner September 12, 2024 11:14
Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

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

Seems reasonable aside from a lost test?

const commands = [
`!cmd ${roomMapping.server} JOIN ${newChannel}`,
`!cmd ${roomMapping.server} TOPIC ${newChannel} :some new fancy topic`,
`!cmd ${roomMapping.server} PART ${newChannel}`,
`!cmd ${roomMapping.server} STUPID COMMANDS`,
`!cmd rubbishserver SOME COMMAND`];
Copy link
Contributor

Choose a reason for hiding this comment

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

we've lost the test for an invalid server here?

Choose a reason for hiding this comment

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

With this change "rubbishserver" is now interpreted as a command rather than as a server.

Copy link
Contributor

Choose a reason for hiding this comment

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

right...we still need to interpret servers here.

Choose a reason for hiding this comment

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

They are interpreted correctly when valid, but rubbishserver matches the new regex.

Perhaps that could be replaced by rubbish^server! or something?

Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

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

oh and

@@ -885,14 +885,12 @@ describe("Admin rooms", function() {
cmdIx++;
});

// 5 commands should be executed
// rubbishserver should not be accepted
// 4 commands should be executed
const commands = [
`!cmd ${roomMapping.server} JOIN ${newChannel}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

We still need to test lower case though?

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.

3 participants