mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Properly disable the commands. Also, the configure prompts still need to be
updated to reflect the correct way to re-enable these commands.
This commit is contained in:
parent
82a4d96ca7
commit
82b0bffb90
@ -66,7 +66,7 @@ def configure(advanced):
|
||||
to run the file command. I'll disable this command
|
||||
now. When you get zegrep in your path, use the command
|
||||
"enable file" to re-enable the command.""")
|
||||
conf.supybot.defaultCapabilities().add('Debian.file')
|
||||
conf.supybot.defaultCapabilities().add('-Debian.file')
|
||||
else:
|
||||
output("""I can't find zegrep in your path. If you want to run
|
||||
the file command with any sort of expediency, you'll
|
||||
@ -77,7 +77,7 @@ def configure(advanced):
|
||||
conf.supybot.plugins.Debian.pythonZegrep.setValue(True)
|
||||
else:
|
||||
output('I\'ll disable file now.')
|
||||
conf.supybot.defaultCapabilities().add('Debian.file')
|
||||
conf.supybot.defaultCapabilities().add('-Debian.file')
|
||||
|
||||
conf.registerPlugin('Debian')
|
||||
conf.registerGlobalValue(conf.supybot.plugins.Debian, 'pythonZegrep',
|
||||
|
@ -65,14 +65,14 @@ def configure(advanced):
|
||||
function of this module will not work. You may choose to
|
||||
install it later. To re-enable this command then, remove
|
||||
the "disable spell" line from your configuration file.""")
|
||||
conf.supybot.defaultCapabilities().add('Unix.spell')
|
||||
conf.supybot.defaultCapabilities().add('-Unix.spell')
|
||||
fortuneCmd = utils.findBinaryInPath('fortune')
|
||||
if not fortuneCmd:
|
||||
output("""NOTE: I couldn't find fortune in your path, so that function
|
||||
of this module will not work. You may choose to install it
|
||||
later. To re-enable this command then, remove the
|
||||
'"disable fortune" command from your configuration file.""")
|
||||
conf.supybot.defaultCapabilities().add('Unix.fortune')
|
||||
conf.supybot.defaultCapabilities().add('-Unix.fortune')
|
||||
wtfCmd = utils.findBinaryInPath('wtf')
|
||||
if not wtfCmd:
|
||||
output("""NOTE: I couldn't find wtf in your path, so that function of
|
||||
@ -80,14 +80,14 @@ def configure(advanced):
|
||||
to re-enable this command then, remove the "disable wtf"
|
||||
command from your configuration file or simply tell the bot
|
||||
"enable wtf" instead.""")
|
||||
conf.supybot.defaultCapabilities().add('Unix.wtf')
|
||||
conf.supybot.defaultCapabilities().add('-Unix.wtf')
|
||||
output("""The "progstats" command can reveal potentially sensitive
|
||||
information about your machine. Here's an example of its output:
|
||||
|
||||
%s\n""" % progstats())
|
||||
if yn('Would you like to disable this command for non-owner users?',
|
||||
default=True):
|
||||
conf.supybot.defaultCapabilities().add('Unix.progstats')
|
||||
conf.supybot.defaultCapabilities().add('-Unix.progstats')
|
||||
|
||||
def progstats():
|
||||
pw = pwd.getpwuid(os.getuid())
|
||||
|
Loading…
Reference in New Issue
Block a user