gameServer/CoreTypes.hs
changeset 4918 c6d3aec73f93
parent 4907 8bf14795a528
child 4932 f11d80bac7ed
--- a/gameServer/CoreTypes.hs	Sat Feb 05 11:05:16 2011 +0300
+++ b/gameServer/CoreTypes.hs	Sat Feb 05 11:32:15 2011 +0300
@@ -13,6 +13,7 @@
 import Network
 import Data.Function
 import Data.ByteString.Char8 as B
+import Data.Unique
 
 import RoomsAndClients
 
@@ -21,6 +22,7 @@
 data ClientInfo =
     ClientInfo
     {
+        clUID :: Unique,
         sendChan :: ClientChan,
         clientSocket :: Socket,
         host :: B.ByteString,
@@ -161,7 +163,7 @@
     deriving (Show, Read)
 
 data DBQuery =
-    CheckAccount ClientIndex B.ByteString B.ByteString
+    CheckAccount ClientIndex Int B.ByteString B.ByteString
     | ClearCache
     | SendStats Int Int
     deriving (Show, Read)
@@ -169,14 +171,14 @@
 data CoreMessage =
     Accept ClientInfo
     | ClientMessage (ClientIndex, [B.ByteString])
-    | ClientAccountInfo (ClientIndex, AccountInfo)
+    | ClientAccountInfo ClientIndex Int AccountInfo
     | TimerAction Int
     | Remove ClientIndex
 
 instance Show CoreMessage where
     show (Accept _) = "Accept"
     show (ClientMessage _) = "ClientMessage"
-    show (ClientAccountInfo _) = "ClientAccountInfo"
+    show (ClientAccountInfo {}) = "ClientAccountInfo"
     show (TimerAction _) = "TimerAction"
     show (Remove _) = "Remove"