gameServer/HWProtoLobbyState.hs
changeset 5573 cc409ee3ad2e
parent 5426 109e9b5761c2
child 5931 184057074257
--- a/gameServer/HWProtoLobbyState.hs	Mon Aug 15 20:18:18 2011 +0400
+++ b/gameServer/HWProtoLobbyState.hs	Mon Aug 15 20:31:31 2011 +0400
@@ -132,9 +132,10 @@
 handleCmd_lobby ["FOLLOW", asknick] = do
     (_, rnc) <- ask
     ci <- clientByNick asknick
+    cl <- thisClient
     let ri = clientRoom rnc $ fromJust ci
     let clRoom = room rnc ri
-    if isNothing ci || ri == lobbyId then
+    if isNothing ci || ri == lobbyId || clientProto cl /= roomProto clRoom then
         return []
         else
         handleCmd_lobby ["JOIN_ROOM", name clRoom]