Skip to content

Conversation

@Exirel
Copy link
Contributor

@Exirel Exirel commented Feb 6, 2021

Description

Close #1870

And because nothing is simple: I also added aliases for urlpban and urlpunban to ban/unban patterns instead of URL directly.

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

@Exirel Exirel added the Feature label Feb 6, 2021
@Exirel Exirel added this to the 7.1.0 milestone Feb 6, 2021
@cottongin
Copy link
Contributor

I like this, my only suggestion is what do you think about renaming the commands to use a different word than "ban"?

At least to me using "ban" implies banning someone from using the plugin. I know it also includes "url" in the command name, so perhaps it is less confusing to others, but the plugin is also named url.py... (maybe a better suggestion would be to rename the plugin title.py or something)

@Exirel
Copy link
Contributor Author

Exirel commented Feb 6, 2021

If you have something better than ban, I'll take it. urlexclude maybe?

@cottongin
Copy link
Contributor

Yes sure, exclude makes more sense to me

Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

"urlpunban" lol 😹

I couldn't take the time just now to think about the # re-compile steps, but surely there's a way to manage bot.memory['url_exclude'] without running a whole list comprehension every time?

@Exirel
Copy link
Contributor Author

Exirel commented Feb 25, 2021

I couldn't take the time just now to think about the # re-compile steps, but surely there's a way to manage bot.memory['url_exclude'] without running a whole list comprehension every time?

I think there is, but I couldn't bother to do something complicated without the proper unit-test to back me up. I think the tradeoff is good for now. I know I tend to be a bit lazy with tests when it comes to plugin, because I never know if I really want to invest in them right now, or wait for when they are all external plugins. After all, I did a 100% test coverage on sopel-help, and I'm doing that for remind too...

dgw
dgw previously approved these changes Feb 25, 2021
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

Squash at will, sir. 🖖

@dgw dgw dismissed their stale review February 25, 2021 06:59

Per IRC discussion, the fixup doesn't work as expected due to sopel.config.types.ListAttribute shenanigans.

@Exirel Exirel force-pushed the url-exclude-command branch from f03f3b2 to fc5f7bc Compare February 25, 2021 07:32
@Exirel Exirel changed the title url: urlban/unban commands url: urlexclude/allow commands Feb 25, 2021
@Exirel
Copy link
Contributor Author

Exirel commented Feb 25, 2021

OK, I squashed and rebased after some further fix and changes, making it worthy of a second full review, I think.

I've settled for urlexclude and urlallow in hope of making @cottongin happy. We discussed this with @dgw but neither of us had an opinion about it. We decided to keep the url(pun)ban because it's funny.

@dgw dgw changed the title url: urlexclude/allow commands url: urlexclude/allow commands; auto-title ignores URLs in ANY other command Feb 28, 2021
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

Retitled to reflect the extra fix Exi sneakily added, so I remember to mention it in the changelog.

@dgw dgw merged commit 142deee into sopel-irc:master Mar 21, 2021
@Exirel Exirel deleted the url-exclude-command branch May 1, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow changing the URL blacklist from IRC

3 participants