mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 12:37:16 +02:00
Fixed bug in @batchcommand (Resolves Issue 287). Also updated @dig to again handle deleting ranges of dbrefs (with or without # in front).
This commit is contained in:
parent
86a44ab84d
commit
4dff822764
5 changed files with 14 additions and 12 deletions
|
|
@ -284,12 +284,14 @@ def pypath_to_realpath(python_path, file_ending='.py'):
|
|||
return "%s%s" % (path, file_ending)
|
||||
return path
|
||||
|
||||
def dbref(dbref):
|
||||
def dbref(dbref, reqhash=True):
|
||||
"""
|
||||
Converts/checks if input is a valid dbref Valid forms of dbref
|
||||
(database reference number) are either a string '#N' or
|
||||
an integer N. Output is the integer part.
|
||||
"""
|
||||
if reqhash and not (isinstance(dbref, basestring) and dbref.startswith("#")):
|
||||
return None
|
||||
if isinstance(dbref, basestring):
|
||||
dbref = dbref.lstrip('#')
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue