A few tweaks to system.py
This commit is contained in:
parent
55676d86d9
commit
d03f6b63c6
1 changed files with 8 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
# Plugin by Lukeroge, and neersighted
|
# Plugin by Lukeroge, and neersighted
|
||||||
|
# Yeah, the code in this sucks. Meh.
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
@ -26,12 +27,15 @@ def checkProc(checked_stats):
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def system(inp):
|
def system(inp):
|
||||||
".system -- Retrieves information about the host system."
|
".system -- Retrieves information about the host system."
|
||||||
name = platform.node()
|
hostname = platform.node()
|
||||||
os = platform.platform()
|
os = platform.platform()
|
||||||
python_version = platform.python_implementation() + ' ' + platform.python_version()
|
python_imp = platform.python_implementation()
|
||||||
arch = '-'.join(platform.architecture())
|
python_ver = platform.python_version()
|
||||||
|
architecture = '-'.join(platform.architecture())
|
||||||
cpu = platform.machine()
|
cpu = platform.machine()
|
||||||
return 'Name: \x02%s\x02, Operating System: \x02%s\x02, Python Version: \x02%s\x02, Architecture: \x02%s\x02, CPU: \x02%s\x02' % (name, os, python_version, arch, cpu)
|
return 'Hostname: \x02%s\x02, Operating System: \x02%s\x02, Python Version:' \
|
||||||
|
' \x02%s %s\x02, Architecture: \x02%s\x02, CPU: \x02%s\x02' % (hostname,
|
||||||
|
os, python_imp, python_ver, architecture, cpu)
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
|
|
Reference in a new issue