go-chat-bot / bot

IRC, Slack, Telegram and RocketChat bot written in go
MIT License
824 stars 194 forks source link

integration of RegisterMessageReceiveFilter work #135

Open bnfinet opened 3 years ago

bnfinet commented 3 years ago

A while back I added the feature RegisterMessageReceiveFilter to my fork... https://github.com/bnfinet/go-chat-bot/blob/master/cmd.go#L282-L296

This filter operation is conducted before command interpretation and execution. This allows for plugins to be created with a generalized allow/disallow and RBAC of commands based on proto/server/channel/user criteria.

Instead of opening a PR I decided to start with an issue to see if this is worthy of inclusion. If so, I'll start from the current master in this repo and (non git) cherry pick the changes, since this work is mostly from a few years back.

Thanks for your consideration.

https://github.com/go-chat-bot/bot/commit/52715792d0b7549a656cc9a6d4f9c69898aeb1b1

fabioxgn commented 3 years ago

Hi @bnfinet this change looks good to me, if you'd like to send a PR, please do so and I'll merge it. Thanks.