X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fmisc.py;h=4e43353bd7c516f1a7063f6b8669bad19fd1850d;hp=bae94b67b8ea3b19e797be2577c4acb31bcfe096;hb=c8a0506ea7e53d3ef6c348282e1be6fc91b749a3;hpb=b380d48d88e91006f3f814623b335ffd7a652b09 diff --git a/mudpy/misc.py b/mudpy/misc.py index bae94b6..4e43353 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -843,11 +843,15 @@ class User: mudpy.telnet.negotiate_telnet_options(self) # separate multiple input lines - new_input_lines = self.partial_input.split(b"\n") + new_input_lines = self.partial_input.split(b"\r\0") + if len(new_input_lines) == 1: + new_input_lines = new_input_lines[0].split(b"\r\n") # if input doesn't end in a newline, replace the # held partial input with the last line of it - if not self.partial_input.endswith(b"\n"): + if not ( + self.partial_input.endswith(b"\r\0") or + self.partial_input.endswith(b"\r\n")): self.partial_input = new_input_lines.pop() # otherwise, chop off the extra null input and reset