-
-
Notifications
You must be signed in to change notification settings - Fork 409
Description
Task summary
- Deprecate
@intentdecorator [7.1, plugin: replace intent by ctcp #1975]- Remove
@intentdecorator [9.0, whensopel.modulegoes away]
- Remove
- Add
@ctcpdecorator [7.1, plugin: replace intent by ctcp #1975] -
Triggerobjects need actcpattribute instead of parsing CTCPs intoTrigger.tags['intent'][7.1, plugin: replace intent by ctcp #1975]- For 7.1, it's totally fine to make a
@propertythat just returns the value ofself.tags['intent']; what's important is providing the future-compatible API ASAP. - Internal rewrites of how the CTCP type is stored will be hidden from plugins behind this new attribute.
- For 7.1, it's totally fine to make a
[ ] Some indication to plugins that accessNAK (comment w/reasoning)trigger.tags['intent']would be good [8.0]-
Rule's interface and subclasses define amatch_intent()method that needs replacing [8.0, loader, rules: use (pre)trigger.ctcp instead of tags #2253]- Since those objects are documented explicitly as "internal" (and quite new anyway), we needn't worry about providing a deprecation warning/timeline.
- Callables should have their
intentsattribute (added by the@ctcpdecorator from plugin: replace intent by ctcp #1975) replaced [8.0, loader, rules: use (pre)trigger.ctcp instead of tags #2253]- There's no need to keep
intentsas the internal attribute name, since@module.intentsimply wraps the@plugin.ctcpimplementation. - This will have to come along with changes to the loader, obviously.
- There's no need to keep
Original issue description follows.
The intents feature is long dead, having been pulled from IRCv3 almost three years ago (ircv3/ircv3-specifications#271). This affects Sopel in a few ways.
First, we have a @module.intent decorator that is now obsolete, named for a dead specification that nobody is going to implement.
Second, Sopel internally handles CTCP ACTIONs (the only use case I was ever aware of for intents) by stripping the CTCP bytes and adding the "ACTION" intent to the trigger instead. That's why plugin functions wanting to act only upon ACTION messages must use @module.intent('ACTION').
Third, obviously the intents attribute added to Sopel callables with intent filters is also obsolete.
In short, there's a fair bit of restructuring to do here. A quick chat with the IRCv3 folks on freenode tells me that CTCP ACTIONs themselves aren't going anywhere, so we should be fine designing an API around those as they currently exist. Maybe we add @module.action, like @module.echo, and kill off regular @module.commands-decorated callables receiving ACTION messages at all. (That would take care of an oddity that exists in current Sopel 6.x, wherein one can do /me .command and Sopel will act on it just like a regular message, which can be unexpected.)
That same chat on IRC also told me that the direct replacement for intents is message-tags. We don't support those at all, at least not in a way that plugins can use.
I'd like to get this done for Sopel 7.0, but only deprecating @module.intent and replacing it with something else is truly important. Opening message-tags up in the plugin API can wait until 7.1+.