mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 20:17:16 +02:00
Made so the local_and_global_search strips the query of surrounding whitespace. Many calling functions don't do this properly, making it a source of bugs. E.g. "@desc obj = text" did not locate obj but "@desc obj= text" did.
This commit is contained in:
parent
ba623af351
commit
cae925c29b
3 changed files with 10 additions and 10 deletions
|
|
@ -135,8 +135,8 @@ class ExtendedANSIParser(MuxANSIParser):
|
|||
(r'{n', normal) #reset
|
||||
] )
|
||||
|
||||
ANSI_PARSER = MuxANSIParser()
|
||||
#ANSI_PARSER = ExtendedANSIParser()
|
||||
#ANSI_PARSER = MuxANSIParser()
|
||||
ANSI_PARSER = ExtendedANSIParser()
|
||||
|
||||
def parse_ansi(string, strip_ansi=False, strip_formatting=False, parser=ANSI_PARSER):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ def cmd_recover(command):
|
|||
Recovers @destroyed non-player objects.
|
||||
|
||||
Usage:
|
||||
@recover [dbref [,dbref2, etc]]
|
||||
@recover[/switches] [obj [,obj2, ...]]
|
||||
|
||||
switches:
|
||||
ROOM - recover as ROOM type instead of THING
|
||||
|
|
@ -818,15 +818,15 @@ def cmd_recover(command):
|
|||
|
||||
If no argument is given, a list of all recoverable objects will be given.
|
||||
|
||||
Objects scheduled for destruction with the @destroy command is cleaned out
|
||||
Objects scheduled for destruction with the @destroy command are cleaned out
|
||||
by the game at regular intervals. Up until the time of the next cleanup you can
|
||||
recover the object using this command (use @ps to check when the next cleanup is due).
|
||||
Note that exits and objects in @destroyed rooms will not be automatically recovered
|
||||
to its former state, you have to @recover those objects manually.
|
||||
Note that exits linked to @destroyed rooms will not be automatically recovered
|
||||
to its former state, you have to @recover those manually.
|
||||
|
||||
The object type is forgotten, so the object is returned as type ITEM if not the
|
||||
switches /ROOM or /EXIT is given. Note that recovering an item as the wrong type will
|
||||
most likely make it nonfunctional.
|
||||
Objects are returned as type THING if the object type is not explicitly set using the
|
||||
switches. Note that recovering an item as the wrong type will most likely make it
|
||||
nonfunctional.
|
||||
"""
|
||||
|
||||
source_object = command.source_object
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ class ObjectManager(models.Manager):
|
|||
dbref_only: (bool) Only compare dbrefs.
|
||||
limit_types: (list of int) A list of Object type numbers to filter by.
|
||||
"""
|
||||
search_query = ostring
|
||||
search_query = str(ostring).strip()
|
||||
|
||||
# This is a global dbref search. Not applicable if we're only searching
|
||||
# searcher's contents/locations, dbref comparisons for location/contents
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue