Made some tweaks to some default commands, such as @version, which was renamed @about and displays some more info about the system.
This commit is contained in:
parent
0e42eb74ed
commit
36b15b4ad8
2 changed files with 37 additions and 12 deletions
|
|
@ -39,7 +39,7 @@ class DefaultCmdSet(CmdSet):
|
||||||
self.add(system.CmdScripts())
|
self.add(system.CmdScripts())
|
||||||
self.add(system.CmdObjects())
|
self.add(system.CmdObjects())
|
||||||
self.add(system.CmdService())
|
self.add(system.CmdService())
|
||||||
self.add(system.CmdVersion())
|
self.add(system.CmdAbout())
|
||||||
self.add(system.CmdTime())
|
self.add(system.CmdTime())
|
||||||
self.add(system.CmdServerLoad())
|
self.add(system.CmdServerLoad())
|
||||||
#self.add(system.CmdPs())
|
#self.add(system.CmdPs())
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ System commands
|
||||||
import traceback
|
import traceback
|
||||||
import os, datetime, time
|
import os, datetime, time
|
||||||
from sys import getsizeof
|
from sys import getsizeof
|
||||||
|
import sys
|
||||||
import django, twisted
|
import django, twisted
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
@ -474,27 +475,51 @@ class CmdService(MuxCommand):
|
||||||
caller.msg("Starting service '%s'." % self.args)
|
caller.msg("Starting service '%s'." % self.args)
|
||||||
service.startService()
|
service.startService()
|
||||||
|
|
||||||
class CmdVersion(MuxCommand):
|
class CmdAbout(MuxCommand):
|
||||||
"""
|
"""
|
||||||
@version - game version
|
@about - game engine info
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
@version
|
@about
|
||||||
|
|
||||||
Display the game version info.
|
Display info about the game engine.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
key = "@version"
|
key = "@about"
|
||||||
|
aliases = "@version"
|
||||||
|
locks = "cmd:all()"
|
||||||
help_category = "System"
|
help_category = "System"
|
||||||
|
|
||||||
def func(self):
|
def func(self):
|
||||||
"Show the version"
|
"Show the version"
|
||||||
version = utils.get_evennia_version()
|
try:
|
||||||
string = "-" * 50 + "\n\r"
|
import south
|
||||||
string += " {cEvennia{n %s\n\r" % version
|
sversion = "{wSouth{n %s" % south.__version__
|
||||||
string += " (Django %s, " % (django.get_version())
|
except ImportError:
|
||||||
string += " Twisted %s)\n\r" % (twisted.version.short())
|
sversion = "{wSouth{n <not installed>"
|
||||||
string += "-" * 50
|
|
||||||
|
string = """
|
||||||
|
{cEvennia{n %s{n
|
||||||
|
MUD/MUX/MU* development system
|
||||||
|
|
||||||
|
{wLicence{n Artistic Licence/GPL
|
||||||
|
{wWeb{n http://www.evennia.com
|
||||||
|
{wIrc{n #evennia on FreeNode
|
||||||
|
{wForum{n http://www.evennia.com/discussions
|
||||||
|
{wMaintainer{n (2010-) Griatch (griatch AT gmail DOT com)
|
||||||
|
{wMaintainer{n (2006-10) Greg Taylor
|
||||||
|
|
||||||
|
{wOS{n %s
|
||||||
|
{wPython{n %s
|
||||||
|
{wDjango{n %s
|
||||||
|
{wTwisted{n %s
|
||||||
|
%s
|
||||||
|
""" % (utils.get_evennia_version(),
|
||||||
|
os.name,
|
||||||
|
sys.version.split()[0],
|
||||||
|
django.get_version(),
|
||||||
|
twisted.version.short(),
|
||||||
|
sversion)
|
||||||
self.caller.msg(string)
|
self.caller.msg(string)
|
||||||
|
|
||||||
class CmdTime(MuxCommand):
|
class CmdTime(MuxCommand):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue