Some polishing
authorunc0rr
Sun, 03 Apr 2011 16:31:48 +0400
changeset 5093 7eb35faa7f7a
parent 5092 28e0a6d2d09a
child 5094 9c3553254100
child 5095 15dd764b728c
Some polishing
gameServer/HWProtoLobbyState.hs
gameServer/ServerCore.hs
--- a/gameServer/HWProtoLobbyState.hs	Sun Apr 03 16:31:40 2011 +0400
+++ b/gameServer/HWProtoLobbyState.hs	Sun Apr 03 16:31:48 2011 +0400
@@ -6,7 +6,6 @@
 import Data.Maybe
 import Data.List
 import Control.Monad.Reader
-import qualified Data.ByteString.Char8 as B
 --------------------------------------
 import CoreTypes
 import Actions
--- a/gameServer/ServerCore.hs	Sun Apr 03 16:31:40 2011 +0400
+++ b/gameServer/ServerCore.hs	Sun Apr 03 16:31:48 2011 +0400
@@ -42,11 +42,10 @@
 
         ClientMessage (ci, cmd) -> do
             liftIO $ debugM "Clients" $ show ci ++ ": " ++ show cmd
-
+            
             removed <- gets removedClients
             unless (ci `Set.member` removed) $ do
-                as <- get
-                put $! as{clientIndex = Just ci}
+                modify (\s -> s{clientIndex = Just ci})
                 reactCmd cmd
 
         Remove ci ->
@@ -56,8 +55,7 @@
             rnc <- gets roomsClients
             exists <- liftIO $ clientExists rnc ci
             when exists $ do
-                as <- get
-                put $! as{clientIndex = Just ci}
+                modify (\s -> s{clientIndex = Just ci})
                 uid' <- client's clUID
                 when (uid == hashUnique uid') $ processAction (ProcessAccountInfo info)
                 return ()