diff options
| author | troido <troido@hotmail.com> | 2018-01-03 20:58:26 +0100 |
|---|---|---|
| committer | troido <troido@hotmail.com> | 2018-01-03 20:58:26 +0100 |
| commit | d76484d23cb8ac0165e97ee86394a595ecbc344b (patch) | |
| tree | b0a46f8ae208e6eec8325c2320891b53cb78b6ea | |
| parent | 4c843c9289f7c2fbc24d90933e5943c29a57baad (diff) | |
fixed long lines messing up chat. fixed global chat
| -rw-r--r-- | asciifarm/client/display/messagepad.py | 3 | ||||
| -rw-r--r-- | asciifarm/client/gameclient.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/asciifarm/client/display/messagepad.py b/asciifarm/client/display/messagepad.py index 88ac3b4..4992b15 100644 --- a/asciifarm/client/display/messagepad.py +++ b/asciifarm/client/display/messagepad.py @@ -49,7 +49,8 @@ class MessagePad(): elif len(lines) < height: lines = (height-len(lines)) * [""] + lines win.erase() - win.addLine((0,0),'\n'.join(lines)) + for i, line in enumerate(lines): + win.addLine((0,i),line) if moreUp: win.addLine((width-1, 0), '-') if moreDown: diff --git a/asciifarm/client/gameclient.py b/asciifarm/client/gameclient.py index 7652f66..6f85e0d 100644 --- a/asciifarm/client/gameclient.py +++ b/asciifarm/client/gameclient.py @@ -63,6 +63,8 @@ class Client: if error == "nametaken": print("error: name is already taken", file=sys.stderr) self.close() + return + self.log(error) if msgType == 'field': field = msg[1] fieldWidth = field['width'] |
