added utf8 support, limit messages length to prevent unexpected disconnects
This commit is contained in:
1 parent
4988ab6ae1
commit
7e993237e3
3 files changed
+10
-11
No files matched your search
@@ -79,7 +79,8 @@ if __name__ == "__main__":
|
||||
try:
|
||||
chat_input = raw_input()
|
||||
if (connection.isConnected):
|
||||
PacketSenderManager.send03(connection.grabSocket(), chat_input)
|
||||
PacketSenderManager.send03(connection.grabSocket(),
|
||||
chat_input.decode('utf-8')[:100])
|
||||
else:
|
||||
pass
|
||||
except KeyboardInterrupt, e:
|
||||
|
||||
Reference in new issue
Block a user