Skip to content

Commit 285cab2

Browse files
committed
clock: add unsetctf functionality
1 parent 080fa1d commit 285cab2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sopel/modules/clock.py

100644100755
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,17 @@ def update_channel_format(bot, trigger):
359359
"commands)" % (timef, set_command, channel_command))
360360

361361

362+
@plugin.command('unsetchanneltimeformat', 'unsetctf')
363+
@plugin.example('.unsetctf')
364+
@plugin.require_chanmsg
365+
@plugin.require_privilege(plugin.OP, message='Changing the channel time format requires OP privileges.')
366+
def unset_channel_format(bot, trigger):
367+
"""Unset the preferred time format for the current channel."""
368+
channel = trigger.sender
369+
bot.db.delete_channel_value(channel, 'time_format')
370+
bot.reply('Successfully unset channel time format')
371+
372+
362373
@plugin.command('getchanneltimeformat', 'getctf')
363374
@plugin.example('.getctf #sopel', user_help=True)
364375
@plugin.example('.getctf', user_help=True)

0 commit comments

Comments
 (0)