Added @reset command per request issue #163

This commit is contained in:
Erika Mustermann 2012-11-07 04:20:03 +00:00
parent 992de0962b
commit 0cd7bd857a

View File

@ -284,6 +284,15 @@ class Config(callbacks.Plugin):
irc.replySuccess()
export = wrap(export, [('checkCapability', 'owner'), 'filename'])
@internationalizeDocstring
def reset(self, irc, msg, args, group):
"""<name>
Resets the configuration variable <name> to its default value.
"""
v = str(group.__class__(group._default, ''))
self._setValue(irc, msg, group, v)
reset = wrap(reset, ['settableConfigVar'])
Class = Config