feat: domain blocker plugin
This commit is contained in:
parent
c9edb57505
commit
7dd02c0056
25 changed files with 898 additions and 63 deletions
|
@ -1,6 +1,7 @@
|
|||
package plugin
|
||||
|
||||
import (
|
||||
"maps"
|
||||
"sync"
|
||||
|
||||
"git.nakama.town/fmartingr/butterrobot/internal/model"
|
||||
|
@ -41,9 +42,7 @@ func GetAvailablePlugins() map[string]model.Plugin {
|
|||
|
||||
// Create a copy to avoid race conditions
|
||||
result := make(map[string]model.Plugin, len(plugins))
|
||||
for id, plugin := range plugins {
|
||||
result[id] = plugin
|
||||
}
|
||||
maps.Copy(result, plugins)
|
||||
|
||||
return result
|
||||
}
|
||||
|
@ -77,6 +76,6 @@ func (p *BasePlugin) RequiresConfig() bool {
|
|||
}
|
||||
|
||||
// OnMessage is the default implementation that does nothing
|
||||
func (p *BasePlugin) OnMessage(msg *model.Message, config map[string]interface{}) []*model.Message {
|
||||
func (p *BasePlugin) OnMessage(msg *model.Message, config map[string]interface{}) []*model.MessageAction {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue