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

settings: Bot assumes + for modes #1917

Closed
dgw opened this issue Aug 4, 2020 · 0 comments · Fixed by #1941
Closed

settings: Bot assumes + for modes #1917

dgw opened this issue Aug 4, 2020 · 0 comments · Fixed by #1941

Comments

@dgw
Copy link
Member

dgw commented Aug 4, 2020

The core.modes setting is assumed to be just a string of letters, and the leading + is assumed by coretasks:

sopel/sopel/coretasks.py

Lines 155 to 156 in a33caf1

modes = bot.config.core.modes
bot.write(('MODE', '%s +%s' % (bot.nick, modes)))

@cottongin rightly pointed out on IRC that sometimes it's desirable to remove modes the IRC server sets by default. While some IRCds will happily accept MODE nickname +-abc (like freenode's), it's not a universal workaround.

I'm happy to add this to 7.1 because 1) it's a pretty trivial change to implement and 2) there's an obvious backward-compatible way to parse the setting.

Proposal: Add the leading + automatically only if the core.modes setting doesn't contain a prefix character (+ or -).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant