Made the find command handle *playername correctly.
This commit is contained in:
parent
59513e5c00
commit
3b1c66dcbc
1 changed files with 12 additions and 5 deletions
|
|
@ -1872,13 +1872,20 @@ class CmdFind(MuxCommand):
|
||||||
low = min(low, high)
|
low = min(low, high)
|
||||||
high = max(low, high)
|
high = max(low, high)
|
||||||
|
|
||||||
if searchstring.startswith("*") or utils.dbref(searchstring):
|
is_dbref = utils.dbref(searchstring)
|
||||||
# A player/dbref search.
|
is_player = searchstring.startswith("*")
|
||||||
# run a normal player- or dbref search. This should be unique.
|
|
||||||
|
if is_dbref or is_player:
|
||||||
|
|
||||||
|
if is_dbref:
|
||||||
|
# a dbref search
|
||||||
|
result = caller.search(searchstring, global_search=True)
|
||||||
|
else:
|
||||||
|
# a player search
|
||||||
|
searchstring = searchstring.lstrip("*")
|
||||||
|
result = caller.search_player(searchstring)
|
||||||
|
|
||||||
string = "{wMatch{n(#%i-#%i):" % (low, high)
|
string = "{wMatch{n(#%i-#%i):" % (low, high)
|
||||||
|
|
||||||
result = caller.search(searchstring, global_search=True)
|
|
||||||
if not result:
|
if not result:
|
||||||
return
|
return
|
||||||
if not low <= int(result.id) <= high:
|
if not low <= int(result.id) <= high:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue