dodingdaga / DalamudPlugins

GNU Affero General Public License v3.0
4 stars 4 forks source link

Feature request: Regex for trigger #5

Closed someMinecrafter closed 1 year ago

someMinecrafter commented 1 year ago

I want to be able to use regex for my triggers. The idea being to use capture groups to obtain the command, and eventual arguments. Depending on implementation would likely make a lot of future requests possible through regex.

With regex, you can attempt to match a string, have capture group(s) return the command (and eventual arguments), and then run them.

Example Regex Trigger: (?i)^(.*), (?:Person(?:nell|s)|Steve(?:-o)|Bear)(?:.|!)$

Example Matches (where '.*' should match a command.): Ouch, Steve-o. (Has the group match 'Ouch') Smile, Person. (Has the group match 'Smile') Smile, personnel. (Has the group match 'Smile')

dodingdaga commented 1 year ago

Hiya! Thanks for all the requests! Really appreciate them. Yes I'm working on an advanced config page for those who have regex experience (regex trigger phrases, whitelist/blacklist players and commands) I'll let you know when these will be included.

dodingdaga commented 1 year ago

Added Regex for trigger in v1.6.6