From fff9b053894a916dff5db726aa91b24a48d02430 Mon Sep 17 00:00:00 2001 From: PangeaCake Date: Mon, 26 Jan 2015 16:15:27 -0800 Subject: [PATCH] Fix to allow ports > 32767 --- mcstatus/pinger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcstatus/pinger.py b/mcstatus/pinger.py index 5fa6f73..f32a6da 100644 --- a/mcstatus/pinger.py +++ b/mcstatus/pinger.py @@ -21,7 +21,7 @@ class ServerPinger: packet.write_varint(0) packet.write_varint(self.version) packet.write_utf(self.host) - packet.write_short(self.port) + packet.write_ushort(self.port) packet.write_varint(1) # Intention to query status self.connection.write_buffer(packet) @@ -143,4 +143,4 @@ class PingResponse: else: self.favicon = None - self.latency = None \ No newline at end of file + self.latency = None