From 4af719fe5b891e25a2d30b45740f91d7e954fa7b Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Tue, 22 Jan 2013 15:03:30 -0500 Subject: [PATCH] fixing things because of assholes --- plugins/dice.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/dice.go b/plugins/dice.go index a3898cc..ab4dc13 100644 --- a/plugins/dice.go +++ b/plugins/dice.go @@ -43,6 +43,10 @@ func (p *DicePlugin) Message(message bot.Message) bool { dice = strings.Split(parts[1], "d") } + if dice < 1 || sides < 2 { + p.Bot.SendMessage(channel, "You're a dick.") + } + if len(dice) == 2 { // We actually have a die roll. nDice, err := strconv.Atoi(dice[0])