Merge pull request #947 from GLolol/unix/log-commands

Unix: log shell and call commands at INFO
This commit is contained in:
Valentin Lorentz 2014-12-13 20:22:41 +01:00
commit 3d66a4649f
1 changed files with 4 additions and 0 deletions

View File

@ -395,6 +395,8 @@ class Unix(callbacks.Plugin):
you don't run anything that will spamify your channel or that
will bring your machine to its knees.
"""
self.log.info('Unix: running command "%s" for %s/%s', text, msg.nick,
irc.network)
args = shlex.split(text)
try:
with open(os.devnull) as null:
@ -425,6 +427,8 @@ class Unix(callbacks.Plugin):
you don't run anything that will spamify your channel or that
will bring your machine to its knees.
"""
self.log.info('Unix: running command "%s" for %s/%s', text, msg.nick,
irc.network)
try:
with open(os.devnull) as null:
inst = subprocess.Popen(text,