mirror of
https://github.com/Syncplay/syncplay
synced 2024-12-24 15:53:02 +00:00
Version check only checks major release
This commit is contained in:
parent
0a0f249b07
commit
0b6b73eba7
@ -82,7 +82,7 @@ class SyncClientProtocol(JSONCommandProtocol):
|
|||||||
username, roomName, version = self._extractHelloArguments(hello)
|
username, roomName, version = self._extractHelloArguments(hello)
|
||||||
if(not username or not roomName or not version):
|
if(not username or not roomName or not version):
|
||||||
self.dropWithError("Not enough Hello arguments")
|
self.dropWithError("Not enough Hello arguments")
|
||||||
elif(version <> syncplay.version): #TODO: change to check only subversion
|
elif(version.split(".")[0:2] != syncplay.version.split(".")[0:2]):
|
||||||
self.dropWithError("Mismatch between versions of client and server")
|
self.dropWithError("Mismatch between versions of client and server")
|
||||||
else:
|
else:
|
||||||
self._client.setUsername(username)
|
self._client.setUsername(username)
|
||||||
@ -266,7 +266,7 @@ class SyncServerProtocol(JSONCommandProtocol):
|
|||||||
username, serverPassword, roomName, roomPassword, version = self._extractHelloArguments(hello)
|
username, serverPassword, roomName, roomPassword, version = self._extractHelloArguments(hello)
|
||||||
if(not username or not roomName or not version):
|
if(not username or not roomName or not version):
|
||||||
self.dropWithError("Not enough Hello arguments")
|
self.dropWithError("Not enough Hello arguments")
|
||||||
elif(version <> syncplay.version): #TODO: change to check only major release
|
elif(version.split(".")[0:2] != syncplay.version.split(".")[0:2]):
|
||||||
self.dropWithError("Mismatch between versions of client and server")
|
self.dropWithError("Mismatch between versions of client and server")
|
||||||
else:
|
else:
|
||||||
if(not self._checkPassword(serverPassword)):
|
if(not self._checkPassword(serverPassword)):
|
||||||
|
Loading…
Reference in New Issue
Block a user