Skip to content

Feat: Add permExactMatchTrigger Lua function#11

Open
avocado-lynx wants to merge 2 commits intoswe-productivity:developmentfrom
avocado-lynx:issue2
Open

Feat: Add permExactMatchTrigger Lua function#11
avocado-lynx wants to merge 2 commits intoswe-productivity:developmentfrom
avocado-lynx:issue2

Conversation

@avocado-lynx
Copy link
Copy Markdown

Closes #2

This PR adds a new Lua function called permExactMatchTrigger which creates a permanent trigger with a single exact match pattern.

Copy link
Copy Markdown
Collaborator

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

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

Looks good and tests out well, thank you! Just one comment.

Comment thread src/TLuaInterpreterMudletObjects.cpp Outdated
{
const QString name = getVerifiedString(L, __func__, 1, "trigger name");
const QString parent = getVerifiedString(L, __func__, 2, "trigger parent");
const QString exactMatchPattern = getVerifiedString(L, __func__, 3, "exact match pattern");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All other perm* functions allow a list of patterns, since a single trigger accepts multiple patterns - see https://wiki.mudlet.org/w/Manual:Lua_Functions#permRegexTrigger as an example. Allowing the same here would help this function stay consistent.

@avocado-lynx
Copy link
Copy Markdown
Author

Thanks! I've addressed that issue.

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.

Missing permExactMatchTrigger

2 participants