mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Added export command.
This commit is contained in:
parent
76fc8b946e
commit
a055bc29a0
@ -45,6 +45,7 @@ import supybot.conf as conf
|
|||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
import supybot.world as world
|
import supybot.world as world
|
||||||
import supybot.ircdb as ircdb
|
import supybot.ircdb as ircdb
|
||||||
|
from supybot.commands import *
|
||||||
import supybot.ircutils as ircutils
|
import supybot.ircutils as ircutils
|
||||||
import supybot.privmsgs as privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
@ -276,6 +277,19 @@ class Config(callbacks.Privmsg):
|
|||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
reload = privmsgs.checkCapability(reload, 'owner')
|
reload = privmsgs.checkCapability(reload, 'owner')
|
||||||
|
|
||||||
|
def export(self, irc, msg, args, filename):
|
||||||
|
"""<filename>
|
||||||
|
|
||||||
|
Exports the public variables of your configuration to <filename>.
|
||||||
|
If you want to show someone your configuration file, but you don't
|
||||||
|
want that person to be able to see things like passwords, etc., this
|
||||||
|
command will export a "sanitized" configuration file suitable for
|
||||||
|
showing publicly.
|
||||||
|
"""
|
||||||
|
registry.close(conf.supybot, filename, private=False)
|
||||||
|
irc.replySuccess()
|
||||||
|
export = wrap(export, [('checkCapability', 'owner'), 'filename'])
|
||||||
|
|
||||||
|
|
||||||
Class = Config
|
Class = Config
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user