countdown remove command and logging

This commit is contained in:
Brian S. Stephan 2010-07-25 15:27:46 -05:00
parent 97368e8ba5
commit 03604ef6f0
1 changed files with 5 additions and 0 deletions

View File

@ -147,6 +147,11 @@ def sub_countdown(connection, event, nick, userhost, replypath, what, admin_unlo
config.set('countdown', item, target.astimezone(tzutc()).isoformat())
connection.privmsg(replypath, 'added countdown item')
elif whats[1] == 'remove':
try:
if config.remove_option('countdown', whats[2]):
connection.privmsg(replypath, 'removed countdown item ' + whats[2])
except NoSectionError: pass
elif whats[1] == 'list':
try:
cdlist = config.options('countdown')