diff -r a94d1dc4a8d9 -r 45778b16b224 gameServer/ServerCore.hs --- a/gameServer/ServerCore.hs Sun Jul 25 18:55:54 2010 +0400 +++ b/gameServer/ServerCore.hs Sun Jul 25 22:39:59 2010 +0400 @@ -35,6 +35,7 @@ si <- gets serverInfo r <- liftIO $ readChan $ coreChan si + liftIO $ putStrLn $ "Core msg: " ++ show r case r of Accept ci -> processAction (AddClient ci) @@ -46,7 +47,9 @@ modify (\as -> as{clientIndex = Just ci}) reactCmd cmd - Remove ci -> processAction (DeleteClient ci) + Remove ci -> do + liftIO $ debugM "Clients" $ "DeleteClient: " ++ show ci + processAction (DeleteClient ci) --else --do @@ -54,10 +57,13 @@ --return (serverInfo, rnc) ClientAccountInfo (ci, info) -> do - removed <- gets removedClients - when (not $ ci `Set.member` removed) $ - processAction (ProcessAccountInfo info) - + --should instead check ci exists and has same nick/hostname + --removed <- gets removedClients + --when (not $ ci `Set.member` removed) $ do + -- modify (\as -> as{clientIndex = Just ci}) + -- processAction (ProcessAccountInfo info) + return () + TimerAction tick -> mapM_ processAction $ PingAll : [StatsAction | even tick]