diff --git a/config.json b/config.json index efc8051..9b76b94 100644 --- a/config.json +++ b/config.json @@ -11,7 +11,7 @@ "QuoteChance": 0.10, "QuoteTime": 30, "LogLength": 50, - "Admins": ["flyngpngn"], + "Admins": ["flyngpngn1"], "comment": "Follows is the old bot", diff --git a/plugins/factoid.go b/plugins/factoid.go index 17f3e69..af1029a 100644 --- a/plugins/factoid.go +++ b/plugins/factoid.go @@ -263,6 +263,10 @@ func (p *FactoidPlugin) changeFact(message bot.Message) bool { } else { result = make([]Factoid, 1) iter.One(&result[0]) + if result[0].CreatedBy != message.User.Name && !message.User.Admin { + p.Bot.SendMessage(message.Channel, "That's not your fact to edit.") + return true + } } // make the changes msg := fmt.Sprintf("Changing %d facts.", len(result))