mirror of https://github.com/velour/catbase.git
first: disallow empty messages
This commit is contained in:
parent
11224e0a2f
commit
bd2e28f72a
|
@ -175,6 +175,9 @@ func (p *FirstPlugin) message(c bot.Connector, kind bot.Kind, message msg.Messag
|
|||
}
|
||||
|
||||
func (p *FirstPlugin) allowed(message msg.Message) bool {
|
||||
if message.Body == "" {
|
||||
return false
|
||||
}
|
||||
for _, m := range p.Bot.Config().GetArray("Bad.Msgs", []string{}) {
|
||||
match, err := regexp.MatchString(m, strings.ToLower(message.Body))
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue