equal
deleted
inserted
replaced
6 import Data.Word |
6 import Data.Word |
7 import qualified Data.Map as Map |
7 import qualified Data.Map as Map |
8 import qualified Data.IntMap as IntMap |
8 import qualified Data.IntMap as IntMap |
9 import qualified Data.IntSet as IntSet |
9 import qualified Data.IntSet as IntSet |
10 import Data.Sequence(Seq, empty) |
10 import Data.Sequence(Seq, empty) |
|
11 import Data.Time |
11 import Network |
12 import Network |
12 |
13 |
13 |
14 |
14 data ClientInfo = |
15 data ClientInfo = |
15 ClientInfo |
16 ClientInfo |
16 { |
17 { |
17 clientUID :: Int, |
18 clientUID :: Int, |
18 sendChan :: Chan [String], |
19 sendChan :: Chan [String], |
19 clientHandle :: Handle, |
20 clientHandle :: Handle, |
20 host :: String, |
21 host :: String, |
|
22 connectTime :: UTCTime, |
21 nick :: String, |
23 nick :: String, |
22 webPassword :: String, |
24 webPassword :: String, |
23 logonPassed :: Bool, |
25 logonPassed :: Bool, |
24 clientProto :: Word16, |
26 clientProto :: Word16, |
25 roomID :: Int, |
27 roomID :: Int, |
117 loginsNumber :: Int, |
119 loginsNumber :: Int, |
118 nextRoomID :: Int, |
120 nextRoomID :: Int, |
119 dbHost :: String, |
121 dbHost :: String, |
120 dbLogin :: String, |
122 dbLogin :: String, |
121 dbPassword :: String, |
123 dbPassword :: String, |
|
124 lastLogins :: [(String, UTCTime)], |
122 stats :: TMVar StatisticsInfo, |
125 stats :: TMVar StatisticsInfo, |
123 coreChan :: Chan CoreMessage, |
126 coreChan :: Chan CoreMessage, |
124 dbQueries :: Chan DBQuery |
127 dbQueries :: Chan DBQuery |
125 } |
128 } |
126 |
129 |
135 0 |
138 0 |
136 0 |
139 0 |
137 "" |
140 "" |
138 "" |
141 "" |
139 "" |
142 "" |
|
143 [] |
140 ) |
144 ) |
141 |
145 |
142 data AccountInfo = |
146 data AccountInfo = |
143 HasAccount String Bool |
147 HasAccount String Bool |
144 | Guest |
148 | Guest |