gameServer/HWProtoLobbyState.hs
changeset 5573 cc409ee3ad2e
parent 5426 109e9b5761c2
child 5931 184057074257
equal deleted inserted replaced
5572:47cc28299baa 5573:cc409ee3ad2e
   130 
   130 
   131 
   131 
   132 handleCmd_lobby ["FOLLOW", asknick] = do
   132 handleCmd_lobby ["FOLLOW", asknick] = do
   133     (_, rnc) <- ask
   133     (_, rnc) <- ask
   134     ci <- clientByNick asknick
   134     ci <- clientByNick asknick
       
   135     cl <- thisClient
   135     let ri = clientRoom rnc $ fromJust ci
   136     let ri = clientRoom rnc $ fromJust ci
   136     let clRoom = room rnc ri
   137     let clRoom = room rnc ri
   137     if isNothing ci || ri == lobbyId then
   138     if isNothing ci || ri == lobbyId || clientProto cl /= roomProto clRoom then
   138         return []
   139         return []
   139         else
   140         else
   140         handleCmd_lobby ["JOIN_ROOM", name clRoom]
   141         handleCmd_lobby ["JOIN_ROOM", name clRoom]
   141 
   142 
   142     ---------------------------
   143     ---------------------------