Changeset 199
- Timestamp:
- 08/07/08 04:02:36 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/antimatter/luke/myplugs/libtracker/timeparser.py
r196 r199 31 31 ievent.reply("Stopping: " + repr(result)) 32 32 return 33 if (ievent.command == "lt-push"): 34 result = user_push_handler(ievent, user) 35 ievent.reply("Pushed: " + repr(result)) 36 return 37 if (ievent.command == "lt-pop"): 38 return 33 39 result = add_extract(ievent) 34 40 if result: 35 41 ievent.reply(str(result)) 36 42 37 def user_start_handler(ievent, user): 38 if (ievent.rest): 43 def user_push_handler(ievent, user): 44 user.category.append(user.tempAdjustment.category) 45 rnum = user_stop_handler(ievent, user) 46 user_start_handler(ievent, user) 47 reply = "Stopped %s, starting new entry" % rnum 48 return reply 49 50 def user_start_handler(ievent, user, category=None): 51 if (not category and ievent.rest): 39 52 category = ievent.rest 40 else:41 category = None42 53 43 54 start = dt.datetime.now()