mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +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
|
to run the file command. I'll disable this command
|
||||||
now. When you get zegrep in your path, use the command
|
now. When you get zegrep in your path, use the command
|
||||||
"enable file" to re-enable the command.""")
|
"enable file" to re-enable the command.""")
|
||||||
conf.supybot.defaultCapabilities().add('Debian.file')
|
conf.supybot.defaultCapabilities().add('-Debian.file')
|
||||||
else:
|
else:
|
||||||
output("""I can't find zegrep in your path. If you want to run
|
output("""I can't find zegrep in your path. If you want to run
|
||||||
the file command with any sort of expediency, you'll
|
the file command with any sort of expediency, you'll
|
||||||
@ -77,7 +77,7 @@ def configure(advanced):
|
|||||||
conf.supybot.plugins.Debian.pythonZegrep.setValue(True)
|
conf.supybot.plugins.Debian.pythonZegrep.setValue(True)
|
||||||
else:
|
else:
|
||||||
output('I\'ll disable file now.')
|
output('I\'ll disable file now.')
|
||||||
conf.supybot.defaultCapabilities().add('Debian.file')
|
conf.supybot.defaultCapabilities().add('-Debian.file')
|
||||||
|
|
||||||
conf.registerPlugin('Debian')
|
conf.registerPlugin('Debian')
|
||||||
conf.registerGlobalValue(conf.supybot.plugins.Debian, 'pythonZegrep',
|
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
|
function of this module will not work. You may choose to
|
||||||
install it later. To re-enable this command then, remove
|
install it later. To re-enable this command then, remove
|
||||||
the "disable spell" line from your configuration file.""")
|
the "disable spell" line from your configuration file.""")
|
||||||
conf.supybot.defaultCapabilities().add('Unix.spell')
|
conf.supybot.defaultCapabilities().add('-Unix.spell')
|
||||||
fortuneCmd = utils.findBinaryInPath('fortune')
|
fortuneCmd = utils.findBinaryInPath('fortune')
|
||||||
if not fortuneCmd:
|
if not fortuneCmd:
|
||||||
output("""NOTE: I couldn't find fortune in your path, so that function
|
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
|
of this module will not work. You may choose to install it
|
||||||
later. To re-enable this command then, remove the
|
later. To re-enable this command then, remove the
|
||||||
'"disable fortune" command from your configuration file.""")
|
'"disable fortune" command from your configuration file.""")
|
||||||
conf.supybot.defaultCapabilities().add('Unix.fortune')
|
conf.supybot.defaultCapabilities().add('-Unix.fortune')
|
||||||
wtfCmd = utils.findBinaryInPath('wtf')
|
wtfCmd = utils.findBinaryInPath('wtf')
|
||||||
if not wtfCmd:
|
if not wtfCmd:
|
||||||
output("""NOTE: I couldn't find wtf in your path, so that function of
|
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"
|
to re-enable this command then, remove the "disable wtf"
|
||||||
command from your configuration file or simply tell the bot
|
command from your configuration file or simply tell the bot
|
||||||
"enable wtf" instead.""")
|
"enable wtf" instead.""")
|
||||||
conf.supybot.defaultCapabilities().add('Unix.wtf')
|
conf.supybot.defaultCapabilities().add('-Unix.wtf')
|
||||||
output("""The "progstats" command can reveal potentially sensitive
|
output("""The "progstats" command can reveal potentially sensitive
|
||||||
information about your machine. Here's an example of its output:
|
information about your machine. Here's an example of its output:
|
||||||
|
|
||||||
%s\n""" % progstats())
|
%s\n""" % progstats())
|
||||||
if yn('Would you like to disable this command for non-owner users?',
|
if yn('Would you like to disable this command for non-owner users?',
|
||||||
default=True):
|
default=True):
|
||||||
conf.supybot.defaultCapabilities().add('Unix.progstats')
|
conf.supybot.defaultCapabilities().add('-Unix.progstats')
|
||||||
|
|
||||||
def progstats():
|
def progstats():
|
||||||
pw = pwd.getpwuid(os.getuid())
|
pw = pwd.getpwuid(os.getuid())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user