* Fixed bug in @reload that had modules reload in random order (causing custom user modules to not overwrite default ones properly).

* Added more info to multiple match search results, to show which matches are in inventory or not.
/Griatch
This commit is contained in:
Griatch 2009-09-28 20:45:36 +00:00
parent f99614346d
commit 82fe65f31f
2 changed files with 12 additions and 4 deletions

View file

@ -185,9 +185,12 @@ class Object(models.Model):
attribute_name=attribute_name)
if len(results) > 1:
s = "More than one match for '%s' (please narrow target):" % ostring
s = "More than one match for '%s' (please narrow target):" % ostring
for num, result in enumerate(results):
s += "\n %i-%s" % (num+1, result.get_name(show_dbref=False))
invtext = ""
if result.get_location() == self:
invtext = " (carried)"
s += "\n %i-%s%s" % (num+1, result.get_name(show_dbref=False),invtext)
emit_to_obj.emit_to(s)
return False
elif len(results) == 0:

View file

@ -114,14 +114,19 @@ class EvenniaService(service.Service):
"""
cmd_modules = self.get_command_modules()
s = []
for mod_str, mod in sys.modules.items():
if mod_str in cmd_modules:
for mod_str in cmd_modules:
if not sys.modules.has_key(mod_str):
comsys.cemit_mudinfo("... %s not reloadable." % mod_str)
logger.log_errmsg("Module %s not reloadable." % mod_str)
else:
mod = sys.modules[mod_str]
s.append(mod_str)
try:
rebuild.rebuild(mod)
except:
comsys.cemit_mudinfo("... Error reloading %s!" % mod_str)
raise
logger.log_infomsg("%s reloaded %i modules: %s" % (source_object, len(s), s))
def reload_aliases(self, source_object=None):