Merge pull request #427 from Erika-Mustermann/testing

Added @reset command per request issue #163
This commit is contained in:
Valentin Lorentz 2012-11-07 00:56:03 -08:00
commit 4552eba9b3

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