print the saved countdown string. not entirely sure if i want to keep this

This commit is contained in:
Brian S. Stephan 2010-07-25 12:47:34 -05:00
parent cfab1e29ca
commit 2a9a17cc94
1 changed files with 3 additions and 1 deletions

View File

@ -148,7 +148,8 @@ def sub_countdown(connection, event, nick, userhost, replypath, what, admin_unlo
connection.privmsg(replypath, 'added countdown item')
else:
try:
time = parse(config.get('countdown', whats[1]))
timestr = config.get('countdown', whats[1])
time = parse(timestr)
rdelta = relativedelta(time, datetime.now().replace(tzinfo=tzlocal()))
relstr = whats[1] + ' will occur in '
if rdelta.years != 0:
@ -163,6 +164,7 @@ def sub_countdown(connection, event, nick, userhost, replypath, what, admin_unlo
relstr += str(rdelta.minutes) + ' minutes '
if rdelta.seconds != 0:
relstr += str(rdelta.seconds) + ' seconds'
relstr += ' (' + timestr + ')'
connection.privmsg(replypath, relstr)
except NoOptionError: pass