X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fmisc.py;h=76f4099e1ec4199f37fbadde4d172d5d47047ed8;hp=930d4d7a72bc8ce18e001e78e6b4b61b04f80769;hb=38aff5fc519f55a8b15a7602f34167bcfea3d7f6;hpb=e25d11c16634028eaf5a498adf0aacc0ad9ffda0 diff --git a/mudpy/misc.py b/mudpy/misc.py index 930d4d7..76f4099 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -1,6 +1,6 @@ """Miscellaneous functions for the mudpy engine.""" -# Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, +# Copyright (c) 2004-2019 mudpy authors. Permission to use, copy, # modify, and distribute this software is granted under terms # provided in the LICENSE file distributed with this software. @@ -636,7 +636,7 @@ class User: def authenticate(self): """Flag the user as authenticated and disconnect duplicates.""" - if self.state is not "authenticated": + if self.state != "authenticated": self.authenticated = True if ("mudpy.limit" in universe.contents and self.account.subkey in universe.contents["mudpy.limit"].get("admins")): @@ -722,7 +722,7 @@ class User: if not just_prompt: output += "$(eol)" if add_prompt: - output += "> " + output += self.account.get("prompt", ">") + " " mode = self.avatar.get("mode") if mode: output += "(" + mode + ") " @@ -1191,7 +1191,7 @@ def weighted_choice(data): # create the expanded list of keys for key in data.keys(): - for count in range(data[key]): + for _count in range(data[key]): expanded.append(key) # return one at random @@ -1242,7 +1242,7 @@ def random_name(): name = "" # create a name of random length from the syllables - for syllable in range(random.randrange(2, 6)): + for _syllable in range(random.randrange(2, 6)): name += weighted_choice(syllables) # strip any leading quotemark, capitalize and return the name