Commit 9406eed0 authored by Ralf's avatar Ralf
Browse files

split lines when logging

parent 5269f460
......@@ -42,7 +42,9 @@ class Player(Thing):
# low-level functions
def send(self, data, end='\n'):
assert type(data) == str"To [{0}]: {1}".format(self.uid, data))
for line in data.split('\n'):
if line:"To [{0}]: '{1}'".format(self.uid, line))
send_async(self.conn, (data+end).encode('utf-8'))
def close(self): # only to be called by Game - it has to remove us from its list
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment