Added a simple tickers command for inspecting the running tickers (no manipulation at this time, not sure how to make that in a safe way).

This commit is contained in:
Griatch 2016-03-24 17:28:00 +01:00
parent dd6b6f06f7
commit cc5fe43372
4 changed files with 41 additions and 1 deletions

View file

@ -2574,4 +2574,3 @@ class CmdSpawn(MuxCommand):
for obj in spawn(prototype):
self.caller.msg("Spawned %s." % obj.get_display_name(self.caller))

View file

@ -47,6 +47,7 @@ class CharacterCmdSet(CmdSet):
self.add(system.CmdTime())
self.add(system.CmdServerLoad())
#self.add(system.CmdPs())
self.add(system.CmdTickers())
# Admin commands
self.add(admin.CmdBoot())

View file

@ -755,3 +755,30 @@ class CmdServerLoad(MuxCommand):
# return to caller
self.caller.msg(string)
class CmdTickers(MuxCommand):
"""
View and manage running tickers
Usage:
@tickers
"""
key = "@tickers"
help_category = "System"
def func(self):
from evennia import TICKER_HANDLER
all_subs = TICKER_HANDLER.all_display()
table = EvTable("interv(s)", "object", "path/methodname", "idstring")
for sub in all_subs:
table.add_row(sub[3],
sub[1] or "[None]",
sub[1] if sub[1] else sub[2],
sub[4] or "[Unset]")
return self.caller.msg(table)