gameServer/Actions.hs
changeset 9446 4fd5df03deb8
parent 9444 30748b1d9ec7
child 9448 04e0acfa7c2c
equal deleted inserted replaced
9444:30748b1d9ec7 9446:4fd5df03deb8
   435                     processAction JoinLobby
   435                     processAction JoinLobby
   436         Admin -> do
   436         Admin -> do
   437             mapM_ processAction [ModifyClient (\cl -> cl{isAdministrator = True}), JoinLobby]
   437             mapM_ processAction [ModifyClient (\cl -> cl{isAdministrator = True}), JoinLobby]
   438             chan <- client's sendChan
   438             chan <- client's sendChan
   439             processAction $ AnswerClients [chan] ["ADMIN_ACCESS"]
   439             processAction $ AnswerClients [chan] ["ADMIN_ACCESS"]
       
   440         ReplayName fn -> processAction $ ShowReplay fn
   440     where
   441     where
   441     isBanned = do
   442     isBanned = do
   442         processAction $ CheckBanned False
   443         processAction $ CheckBanned False
   443         liftM B.null $ client's nick
   444         liftM B.null $ client's nick
   444     checkerLogin _ False _ = processAction $ ByeClient $ loc "No checker rights"
   445     checkerLogin _ False _ = processAction $ ByeClient $ loc "No checker rights"
   696     io $ writeChan (dbQueries si) $ StoreAchievements (B.pack fileName) (map toPair teams) info
   697     io $ writeChan (dbQueries si) $ StoreAchievements (B.pack fileName) (map toPair teams) info
   697     io $ moveCheckedRecord fileName
   698     io $ moveCheckedRecord fileName
   698     where
   699     where
   699         toPair t = (teamname t, teamowner t)
   700         toPair t = (teamname t, teamowner t)
   700 
   701 
       
   702 processAction (QueryReplay name) = do
       
   703     (Just ci) <- gets clientIndex
       
   704     si <- gets serverInfo
       
   705     uid <- client's clUID
       
   706     io $ writeChan (dbQueries si) $ GetReplayName ci (hashUnique uid) name
       
   707 
   701 #else
   708 #else
   702 processAction SaveReplay = return ()
   709 processAction SaveReplay = return ()
   703 processAction CheckRecord = return ()
   710 processAction CheckRecord = return ()
   704 processAction (CheckFailed _) = return ()
   711 processAction (CheckFailed _) = return ()
   705 processAction (CheckSuccess _) = return ()
   712 processAction (CheckSuccess _) = return ()
       
   713 processAction (QueryReplay _) = return ()
   706 #endif
   714 #endif
       
   715 
       
   716 processAction (ShowReplay name) = do
       
   717     return ()
       
   718