gameServer/ServerCore.hs
changeset 3673 45778b16b224
parent 3671 a94d1dc4a8d9
child 3741 73246d25dfe1
--- 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]