mirror of https://github.com/velour/catbase.git
Embiggening the exclusions list
This commit is contained in:
parent
9b51ce79ba
commit
543526478e
|
@ -27,7 +27,9 @@
|
|||
"Joins upset the hivemind's CDO, %s.",
|
||||
"%s, I WILL CUT YOU!"
|
||||
],
|
||||
"BadMsgs": [
|
||||
"I like cron."
|
||||
]
|
||||
"Bad": {
|
||||
"Msgs": [],
|
||||
"Nicks": [],
|
||||
"Hosts": []
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,11 @@ type Config struct {
|
|||
TwitterUserKey string
|
||||
TwitterUserSecret string
|
||||
BadMsgs []string
|
||||
Bad struct {
|
||||
Msgs []string
|
||||
Nicks []string
|
||||
Hosts []string
|
||||
}
|
||||
}
|
||||
|
||||
// Readconfig loads the config data out of a JSON file located in cfile
|
||||
|
|
|
@ -84,7 +84,7 @@ func (p *FirstPlugin) Message(message bot.Message) bool {
|
|||
}
|
||||
|
||||
func (p *FirstPlugin) allowed(message bot.Message) bool {
|
||||
for _, msg := range p.Bot.Config.BadMsgs {
|
||||
for _, msg := range p.Bot.Config.Bad.Msgs {
|
||||
if strings.ToLower(msg) == strings.ToLower(message.Body) {
|
||||
log.Println("Disallowing first: ", message.User.Name, ":", message.Body)
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue