print the saved countdown string. not entirely sure if i want to keep this
This commit is contained in:
parent
cfab1e29ca
commit
2a9a17cc94
|
@ -148,7 +148,8 @@ def sub_countdown(connection, event, nick, userhost, replypath, what, admin_unlo
|
||||||
connection.privmsg(replypath, 'added countdown item')
|
connection.privmsg(replypath, 'added countdown item')
|
||||||
else:
|
else:
|
||||||
try:
|
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()))
|
rdelta = relativedelta(time, datetime.now().replace(tzinfo=tzlocal()))
|
||||||
relstr = whats[1] + ' will occur in '
|
relstr = whats[1] + ' will occur in '
|
||||||
if rdelta.years != 0:
|
if rdelta.years != 0:
|
||||||
|
@ -163,6 +164,7 @@ def sub_countdown(connection, event, nick, userhost, replypath, what, admin_unlo
|
||||||
relstr += str(rdelta.minutes) + ' minutes '
|
relstr += str(rdelta.minutes) + ' minutes '
|
||||||
if rdelta.seconds != 0:
|
if rdelta.seconds != 0:
|
||||||
relstr += str(rdelta.seconds) + ' seconds'
|
relstr += str(rdelta.seconds) + ' seconds'
|
||||||
|
relstr += ' (' + timestr + ')'
|
||||||
connection.privmsg(replypath, relstr)
|
connection.privmsg(replypath, relstr)
|
||||||
except NoOptionError: pass
|
except NoOptionError: pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue