Refactored amp.py to more cleanly splitting long AMP messages also during server sync (this could cause errors with a large number of connected players). Also fixed an issue with the lockstring get:all() being set by @create despite it not needing to (overloading changes in the typeclass).

This commit is contained in:
Griatch 2013-11-27 16:57:41 +01:00
parent 1ae17bcbe4
commit e9e2c78eef
9 changed files with 301 additions and 201 deletions

View file

@ -422,7 +422,7 @@ class CmdCreate(ObjManipCommand):
# create object (if not a valid typeclass, the default
# object typeclass will automatically be used)
lockstring = "control:id(%s);examine:perm(Builders);delete:id(%s) or perm(Wizards);get:all()" % (caller.id, caller.id)
lockstring = "control:id(%s);examine:perm(Builders);delete:id(%s) or perm(Wizards)" % (caller.id, caller.id)
obj = create.create_object(typeclass, name, caller,
home=caller, aliases=aliases,
locks=lockstring, report_to=caller)

View file

@ -713,11 +713,12 @@ class CmdServerLoad(MuxCommand):
"%.2f" % (float(tup[2] / totcache[1]) * 100)])
# get sizes of other caches
attr_cache_info, field_cache_info, prop_cache_info = get_cache_sizes()
attr_cache_info, prop_cache_info = get_cache_sizes()
string += "\n{w Entity idmapper cache usage:{n %5.2f MB (%i items)\n%s" % (totcache[1], totcache[0], memtable)
string += "\n{w On-entity Attribute cache usage:{n %5.2f MB (%i attrs)" % (attr_cache_info[1], attr_cache_info[0])
string += "\n{w On-entity Field cache usage:{n %5.2f MB (%i fields)" % (field_cache_info[1], field_cache_info[0])
string += "\n{w On-entity Property cache usage:{n %5.2f MB (%i props)" % (prop_cache_info[1], prop_cache_info[0])
base_mem = vmem - totcache[1] - attr_cache_info[1] - prop_cache_info[1]
string += "\n{w Base Server usage (virtmem-idmapper-attrcache-propcache):{n %5.2f MB" % base_mem
caller.msg(string)