From a3312c7c5038745e6d6a2a22f54a7aea60beffae Mon Sep 17 00:00:00 2001 From: skiesel Date: Mon, 9 May 2016 13:27:28 -0400 Subject: [PATCH 1/2] miscounted tokens in reminder plugin --- plugins/reminder/reminder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/reminder/reminder.go b/plugins/reminder/reminder.go index 69a8994..6a4aafd 100644 --- a/plugins/reminder/reminder.go +++ b/plugins/reminder/reminder.go @@ -91,7 +91,7 @@ func (p *ReminderPlugin) Message(message msg.Message) bool { parts := strings.Fields(message.Body) - if len(parts) > 5 { + if len(parts) >= 5 { if strings.ToLower(parts[0]) == "remind" { who := parts[1] dur, err := time.ParseDuration(parts[3]) From cf088bf8adf7db623731330cb47cc421bba517e4 Mon Sep 17 00:00:00 2001 From: skiesel Date: Mon, 9 May 2016 16:46:29 -0400 Subject: [PATCH 2/2] remove a few debugging lines --- plugins/reminder/reminder.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/reminder/reminder.go b/plugins/reminder/reminder.go index 6a4aafd..5dc86c7 100644 --- a/plugins/reminder/reminder.go +++ b/plugins/reminder/reminder.go @@ -61,10 +61,6 @@ func New(bot bot.Bot) *ReminderPlugin { func reminderer(p *ReminderPlugin) { //welcome to the reminderererererererererer for { - fmt.Println() - fmt.Println("waiting...") - fmt.Println() - <-p.timer.C p.mutex.Lock()