fixing things because of assholes

This commit is contained in:
Chris Sexton 2013-01-22 15:03:30 -05:00
parent 5d90f7a920
commit 4af719fe5b
1 changed files with 4 additions and 0 deletions

View File

@ -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])