X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fmisc.py;h=822beeb44ca704b47eb50d669884445a506dce65;hp=470fb967a2c3bcd64ccb3632a12aa7e5a8e78850;hb=7c003a0c7786083c6b0697d23b1b595dc70005bd;hpb=eb44bf1fb134133277139432a8dce72b9f38ba9d diff --git a/mudpy/misc.py b/mudpy/misc.py index 470fb96..822beeb 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -299,7 +299,7 @@ class Element: def portals(self): """Map the portal directions for an area to neighbors.""" portals = {} - if re.match("""^area:-?\d+,-?\d+,-?\d+$""", self.key): + if re.match(r"""^area:-?\d+,-?\d+,-?\d+$""", self.key): coordinates = [(int(x)) for x in self.key.split(":")[1].split(",")] offsets = dict( @@ -2178,21 +2178,21 @@ def command_show(actor, parameters): "$(eol)$(bld)%s$(nrm)" % e) elif arguments[0] == "log": if len(arguments) == 4: - if re.match("^\d+$", arguments[3]) and int(arguments[3]) >= 0: + if re.match(r"^\d+$", arguments[3]) and int(arguments[3]) >= 0: stop = int(arguments[3]) else: stop = -1 else: stop = 0 if len(arguments) >= 3: - if re.match("^\d+$", arguments[2]) and int(arguments[2]) > 0: + if re.match(r"^\d+$", arguments[2]) and int(arguments[2]) > 0: start = int(arguments[2]) else: start = -1 else: start = 10 if len(arguments) >= 2: - if (re.match("^\d+$", arguments[1]) + if (re.match(r"^\d+$", arguments[1]) and 0 <= int(arguments[1]) <= 9): level = int(arguments[1]) else: