From 4fb353c151e2bbae53a5cc9cbdacb631ec8c76ee Mon Sep 17 00:00:00 2001 From: Etoh Date: Wed, 26 Mar 2014 03:03:12 +0000 Subject: [PATCH] Provide clientVersion to getMotd via sendHello --- syncplay/protocols.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syncplay/protocols.py b/syncplay/protocols.py index c8efaf5..f83cfa0 100644 --- a/syncplay/protocols.py +++ b/syncplay/protocols.py @@ -291,9 +291,9 @@ class SyncServerProtocol(JSONCommandProtocol): return self._factory.addWatcher(self, username, roomName, roomPassword) self._logged = True - self.sendHello() + self.sendHello(version) - def sendHello(self): + def sendHello(self, clientVersion): hello = {} username = self._factory.watcherGetUsername(self) hello["username"] = username @@ -301,7 +301,7 @@ class SyncServerProtocol(JSONCommandProtocol): room = self._factory.watcherGetRoom(self) if(room): hello["room"] = {"name": room} hello["version"] = syncplay.version - hello["motd"] = self._factory.getMotd(userIp, username, room) + hello["motd"] = self._factory.getMotd(userIp, username, room, clientVersion) self.sendMessage({"Hello": hello}) @requireLogged