'This is similar to `DefaultObject.search` but defaults to searching
for Players only.
Args:
searchdata (str or int): Search criterion, the Player\'s
key or dbref to search for.
return_puppet (bool, optional): Instructs the method to
return matches as the object the Player controls rather
than the Player itself (or None) if nothing is puppeted).
search_object (bool, optional): Search for Objects instead of
Players. This is used by e.g. the @examine command when
wanting to examine Objects while OOC.
typeclass (Player typeclass, optional): Limit the search
only to this particular typeclass. This can be used to
limit to specific player typeclasses or to limit the search
to a particular Object typeclass if `search_object` is True.
nofound_string (str, optional): A one-time error message
to echo if `searchdata` leads to no matches. If not given,
will fall back to the default handler.
multimatch_string (str, optional): A one-time error
message to echo if `searchdata` leads to multiple matches.
If not given, will fall back to the default handler.
Return:
match (Player, Object or None): A single Player or Object match.
Notes:
Extra keywords are ignored, but are allowed in call in
order to make API more consistent with
objects.objects.DefaultObject.search.'

def search(self, searchdata, return_puppet=False, search_object=False, typeclass=None, nofound_string=None, multimatch_string=None, **kwargs):

    if isinstance(searchdata, basestring):
        if (searchdata.lower() in ('me', '*me', 'self', '*self')):
            return self
    if search_object:
        matches = ObjectDB.objects.object_search(searchdata, typeclass=typeclass)
    else:
        matches = PlayerDB.objects.player_search(searchdata, typeclass=typeclass)
    matches = _AT_SEARCH_RESULT(matches, self, query=searchdata, nofound_string=nofound_string, multimatch_string=multimatch_string)
    if (matches and return_puppet):
        try:
            return matches.puppet
        except AttributeError:
            return None
    return matches
