gameServer/HWProtoLobbyState.hs
changeset 2961 3e057dfa601f
parent 2867 9be6693c78cb
child 3260 b44b88908758
equal deleted inserted replaced
2960:b467a681c5e0 2961:3e057dfa601f
   115                 answerAllTeams (clientProto client) (teams jRoom)
   115                 answerAllTeams (clientProto client) (teams jRoom)
   116 
   116 
   117 
   117 
   118 handleCmd_lobby clID clients rooms ["JOIN_ROOM", roomName] =
   118 handleCmd_lobby clID clients rooms ["JOIN_ROOM", roomName] =
   119     handleCmd_lobby clID clients rooms ["JOIN_ROOM", roomName, ""]
   119     handleCmd_lobby clID clients rooms ["JOIN_ROOM", roomName, ""]
       
   120     
       
   121 
       
   122 handleCmd_lobby clID clients rooms ["FOLLOW", asknick] =
       
   123     if noSuchClient || roomID followClient == 0 then
       
   124         []
       
   125     else
       
   126         handleCmd_lobby clID clients rooms ["JOIN_ROOM", roomName]
       
   127     where
       
   128         maybeClient = Foldable.find (\cl -> asknick == nick cl) clients
       
   129         noSuchClient = isNothing maybeClient
       
   130         followClient = fromJust maybeClient
       
   131         roomName = name $ rooms IntMap.! roomID followClient
       
   132 
   120 
   133 
   121     ---------------------------
   134     ---------------------------
   122     -- Administrator's stuff --
   135     -- Administrator's stuff --
   123 
   136 
   124 handleCmd_lobby clID clients rooms ["KICK", kickNick] =
   137 handleCmd_lobby clID clients rooms ["KICK", kickNick] =