diff --git a/sandbox/Debug/plugin.py b/sandbox/Debug/plugin.py index ad09dc6e8..e6adb7e02 100644 --- a/sandbox/Debug/plugin.py +++ b/sandbox/Debug/plugin.py @@ -55,16 +55,6 @@ def getTracer(fd): print >>fd, '%s: %s' % (code.co_filename, code.co_name) return tracer -def progstats(): - pw = pwd.getpwuid(os.getuid()) - response = 'Process ID %s running as user "%s" and as group "%s" ' \ - 'from directory "%s" with the command line "%s". ' \ - 'Running on Python %s.' % \ - (os.getpid(), pw[0], pw[3], - os.getcwd(), ' '.join(sys.argv), - sys.version.translate(string.ascii, '\r\n')) - return response - class Debug(callbacks.Privmsg): capability = 'owner' def __init__(self, irc): @@ -189,7 +179,14 @@ class Debug(callbacks.Privmsg): Returns various unix-y information on the running supybot process. """ - irc.reply(progstats()) + pw = pwd.getpwuid(os.getuid()) + response = 'Process ID %s running as user "%s" and as group "%s" ' \ + 'from directory "%s" with the command line "%s". ' \ + 'Running on Python %s.' % \ + (os.getpid(), pw[0], pw[3], + os.getcwd(), ' '.join(sys.argv), + sys.version.translate(string.ascii, '\r\n')) + irc.reply(response) progstats = wrap(progstats) def environ(self, irc, msg, args):