From 2f492a4659b53118588a1984f6311edf72d9f154 Mon Sep 17 00:00:00 2001 From: lukeroge Date: Wed, 28 Mar 2012 12:22:43 +1300 Subject: [PATCH] added .system to get info on the host system --- plugins/misc.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/misc.py b/plugins/misc.py index de62cb8..7691582 100755 --- a/plugins/misc.py +++ b/plugins/misc.py @@ -1,6 +1,7 @@ import re import socket import subprocess +import platform import time from util import hook, http @@ -60,3 +61,12 @@ def onjoin(paraml, conn=None, bot=None): while True: time.sleep(delay) conn.cmd('PING', [conn.nick]) + +# system info command +@hook.command(autohelp=False) +def system(inp): + ".system -- retrieves information about the host system" + python_version = platform.python_version() + os = platform.platform(aliased=True) + cpu = platform.machine() + return "Platform: %s, Python Version: %s, CPU: %s" % (os, python_version, cpu)