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

coretasks: handle BOT ISUPPORT token & mode #2088

Merged
merged 1 commit into from
Jul 1, 2021
Merged

coretasks: handle BOT ISUPPORT token & mode #2088

merged 1 commit into from
Jul 1, 2021

Conversation

dgw
Copy link
Member

@dgw dgw commented Jun 6, 2021

Description

If the server advertises a BOT token in 005 ISUPPORT, Sopel will set that mode on itself unless that modechar appears in the value of core.modes in its configuration.

Implements part of #2079.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches
    • By the power of pytest, yes!

Notes

The default value of core.modes is B, which is the conventional modechar to advertise for BOT. Thus this won't do much on most networks unless the user overrides core.modes and doesn't know about this mode.

Support tables

Note to self: Prepped a support table update for IRCv3 here.

@dgw dgw added this to the 8.0.0 milestone Jun 6, 2021
@dgw dgw requested a review from a team June 6, 2021 11:11
dgw added a commit to dgw/ircv3.github.io that referenced this pull request Jun 6, 2021
@dgw dgw mentioned this pull request Jun 6, 2021
3 tasks
Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

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

I really like the code and the added tests. For completeness, I'd like to see 2 other test cases:

  • one when core.modes contains more than one mode but none is the one in BOT
  • and a second one, very similar, where core.modes contains more than one mode including the one in BOT

After all, the code does the botmodes in config and not botmodes == config.

@dgw
Copy link
Member Author

dgw commented Jun 6, 2021

@Exirel Added. @pytest.mark.parametrize is a beautiful thing… again.

Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

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

👼

@dgw dgw merged commit 6481dca into master Jul 1, 2021
@dgw dgw deleted the botmode branch July 1, 2021 05:01
@dgw dgw mentioned this pull request Apr 12, 2022
10 tasks
@dgw dgw mentioned this pull request Apr 29, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants