X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fmisc.py;h=b4009c90c9cf9e9dafb6962e330084da75853735;hp=0e7e561298d9551af13789c94fb30ed3cdf01514;hb=f0c07e0cbc98ffc01b59d15a0e9854b04ebc8a78;hpb=b07eddb9ea3d35a8400261e96ca38ff2622bbcc1 diff --git a/mudpy/misc.py b/mudpy/misc.py index 0e7e561..b4009c9 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -661,6 +661,10 @@ class User: self.error = False self.adjust_echoing() + def prompt(self): + """"Generate and return an input prompt.""" + return self.account.get("prompt", ">") + " " + def adjust_echoing(self): """Adjust echoing to match state menu requirements.""" if mudpy.telnet.is_enabled(self, mudpy.telnet.TELOPT_ECHO, @@ -723,7 +727,7 @@ class User: if not just_prompt: output += "$(eol)" if add_prompt: - output += self.account.get("prompt", ">") + " " + output += self.prompt() mode = self.avatar.get("mode") if mode: output += "(" + mode + ") "