From b126a69b28b1ea1d252b02828616ab6806dfeda1 Mon Sep 17 00:00:00 2001 From: Will Beddow Date: Wed, 1 Mar 2017 11:47:57 -0500 Subject: [PATCH] :wrench: Reminder optimization --- core/plugins/reminder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/plugins/reminder.py b/core/plugins/reminder.py index 850f4f3..d677e9e 100644 --- a/core/plugins/reminder.py +++ b/core/plugins/reminder.py @@ -27,7 +27,6 @@ def is_reminder(event): else: return False - @subscribe({"name": "reminder", "check": is_reminder}) def main(event): '''Set a reminder using the interface scheduler''' @@ -64,6 +63,9 @@ def main(event): lefts = [left.orth_ for left in chunk.lefts] rights = [right.orth_ for right in chunk.rights] event_time = " ".join(lefts + [chunk.text] + rights) + #Break out of the loop so the event time is the first matching word + if time_message: + break if not time_message: time_message == "Reminder: {0}".format(event_command) if not event_time: