Fixed erroneous global_search keyword in a few places in the code due to the API having changed. Resolves issue 276.

This commit is contained in:
Griatch 2012-10-14 12:06:42 +02:00
parent 8b582c9d3f
commit 97973dd5f9
3 changed files with 29 additions and 29 deletions

View file

@ -677,7 +677,7 @@ class CmdIC(MuxCommandOOC):
return return
if not new_character: if not new_character:
# search for a matching character # search for a matching character
new_character = search.objects(self.args, caller, global_search=True, single_result=True) new_character = search.objects(self.args, caller)
if new_character: if new_character:
new_character = new_character[0] new_character = new_character[0]
else: else:

View file

@ -262,7 +262,7 @@ class CmdScripts(MuxCommand):
scripts = ScriptDB.objects.get_all_scripts(key=args) scripts = ScriptDB.objects.get_all_scripts(key=args)
if not scripts: if not scripts:
# try to find an object instead. # try to find an object instead.
objects = ObjectDB.objects.object_search(args, caller=caller, global_search=True) objects = ObjectDB.objects.object_search(args, caller=caller)
if objects: if objects:
scripts = [] scripts = []
for obj in objects: for obj in objects:

View file

@ -49,7 +49,7 @@ HelpEntry = ContentType.objects.get(app_label="help", model="helpentry").model_c
# by using self.caller.search()! # by using self.caller.search()!
# #
# def object_search(self, ostring, caller=None, # def object_search(self, ostring, caller=None,
# global_search=False, # candidates=None,
# attribute_name=None): # attribute_name=None):
# """ # """
# Search as an object and return results. # Search as an object and return results.
@ -57,7 +57,7 @@ HelpEntry = ContentType.objects.get(app_label="help", model="helpentry").model_c
# ostring: (string) The string to compare names against. # ostring: (string) The string to compare names against.
# Can be a dbref. If name is appended by *, a player is searched for. # Can be a dbref. If name is appended by *, a player is searched for.
# caller: (Object) The object performing the search. # caller: (Object) The object performing the search.
# global_search: Search all objects, not just the current location/inventory # candidates (list of Objects): restrict search only to those objects
# attribute_name: (string) Which attribute to search in each object. # attribute_name: (string) Which attribute to search in each object.
# If None, the default 'name' attribute is used. # If None, the default 'name' attribute is used.
# """ # """