Open researcx opened 4 years ago
i've implemented the changes for the IRC module in my personal fork that i use for my network i decided to make multiple sets of trigger words, global and channel-specific, and allow the setting of chance percentages per each word, whilst trying not to make it too inconvenient to set up for end-users
the code: https://github.com/unendingPattern/pyborg-1up/blob/trigger-words/pyborg/pyborg/mod/mod_irc.py#L137
the config options: https://github.com/unendingPattern/pyborg-1up/blob/trigger-words/pyborg/example.irc.toml#L23 https://github.com/unendingPattern/pyborg-1up/blob/trigger-words/pyborg/example.irc.toml#L44
it probably wouldn't be difficult to implement this for the other protocols, personally i'm only using the IRC module for now
i can also open a PR for this if you wish
Have a configurable list of trigger words and a configuration option for % chance to reply upon a word being said. Perhaps do something like how weechat's highlights work.
This could also change how #26 is done as users could just have bot's nick in the list and optionally put a "(?-i)" before it to make it case sensitive if desired, you could just set the default/example as the bot's nick.
Example: