--- a/gameServer/Actions.hs Thu Jan 27 22:06:42 2011 +0300
+++ b/gameServer/Actions.hs Thu Jan 27 22:10:24 2011 +0300
@@ -45,7 +45,6 @@
| CheckRegistered
| ClearAccountsCache
| ProcessAccountInfo AccountInfo
- | Dump
| AddClient ClientInfo
| DeleteClient ClientIndex
| PingAll
@@ -365,18 +364,12 @@
liftIO $ writeChan db $ CheckAccount ci n h
return ()
-{-
-processAction (clID, serverInfo, rnc) (ClearAccountsCache) = do
- writeChan (dbQueries serverInfo) ClearCache
- return (clID, serverInfo, rnc)
- where
- client = clients ! clID
+processAction ClearAccountsCache = do
+ dbq <- gets (dbQueries . serverInfo)
+ liftIO $ writeChan dbq ClearCache
+ return ()
-processAction (clID, serverInfo, rnc) (Dump) = do
- writeChan (sendChan $ clients ! clID) ["DUMP", show serverInfo, showTree clients, showTree rooms]
- return (clID, serverInfo, rnc)
--}
processAction (ProcessAccountInfo info) =
case info of
--- a/gameServer/Utils.hs Thu Jan 27 22:06:42 2011 +0300
+++ b/gameServer/Utils.hs Thu Jan 27 22:10:24 2011 +0300
@@ -121,3 +121,5 @@
showB :: Show a => a -> B.ByteString
showB = B.pack .show
+
+io = liftIO