Changed player.search to only search for players explicitly.

Added a MuxCommandOOC class to handle the OOC commands in a more uniform way.
Fixed the @ic/@ooc and page commands. Resolves issue 233. Resolves issue 234.
This commit is contained in:
Griatch 2012-05-17 19:42:37 +02:00
parent 96e95ca525
commit 8ad4f4a9fc
12 changed files with 253 additions and 168 deletions

View file

@ -203,7 +203,7 @@ class ObjectManager(TypedObjectManager):
@returns_typeclass_list
def object_search(self, ostring, caller=None,
global_search=False,
attribute_name=None, location=None):
attribute_name=None, location=None, single_result=False):
"""
Search as an object and return results. The result is always an Object.
If * is appended (player search, a Character controlled by this Player
@ -313,7 +313,7 @@ class ObjectManager(TypedObjectManager):
matches = [matches[match_number]]
except IndexError:
pass
# This is always a list.
# We always have a (possibly empty) list at this point.
return matches
#

View file

@ -28,7 +28,7 @@ from src.commands.cmdsethandler import CmdSetHandler
from src.commands import cmdhandler
from src.scripts.scripthandler import ScriptHandler
from src.utils import logger
from src.utils.utils import make_iter, to_unicode, variable_from_module
from src.utils.utils import make_iter, to_unicode, variable_from_module, inherits_from
#__all__ = ("ObjAttribute", "Alias", "ObjectNick", "ObjectDB")
@ -245,7 +245,7 @@ class ObjectDB(TypedObject):
#@player.setter
def __player_set(self, player):
"Setter. Allows for self.player = value"
if isinstance(player, TypeClass):
if inherits_from(player, TypeClass):
player = player.dbobj
_set_cache(self, "player", player)
#@player.deleter