equal
deleted
inserted
replaced
115 nextRoomID :: Int, |
115 nextRoomID :: Int, |
116 dbHost :: String, |
116 dbHost :: String, |
117 dbLogin :: String, |
117 dbLogin :: String, |
118 dbPassword :: String, |
118 dbPassword :: String, |
119 stats :: TMVar StatisticsInfo, |
119 stats :: TMVar StatisticsInfo, |
|
120 coreChan :: Chan CoreMessage, |
120 dbQueries :: Chan DBQuery |
121 dbQueries :: Chan DBQuery |
121 } |
122 } |
122 |
123 |
123 instance Show ServerInfo where |
124 instance Show ServerInfo where |
124 show si = "Logins: " ++ (show $ loginsNumber si) |
125 show si = "Logins: " ++ (show $ loginsNumber si) |
133 "" |
134 "" |
134 "" |
135 "" |
135 "" |
136 "" |
136 ) |
137 ) |
137 |
138 |
|
139 data AccountInfo = |
|
140 HasAccount |
|
141 | LogonPassed |
|
142 | Guest |
|
143 |
138 data CoreMessage = |
144 data CoreMessage = |
139 Accept ClientInfo |
145 Accept ClientInfo |
140 | ClientMessage (Int, [String]) |
146 | ClientMessage (Int, [String]) |
|
147 | ClientAccountInfo Int AccountInfo |
141 -- | CoreMessage String |
148 -- | CoreMessage String |
142 -- | TimerTick |
149 -- | TimerTick |
143 |
150 |
144 data DBQuery = |
151 data DBQuery = |
145 HasRegistered String |
152 CheckAccount Int String |
146 | CheckPassword String |
153 | CheckPassword String |
147 |
154 |
148 |
155 |
149 type Clients = IntMap.IntMap ClientInfo |
156 type Clients = IntMap.IntMap ClientInfo |
150 type Rooms = IntMap.IntMap RoomInfo |
157 type Rooms = IntMap.IntMap RoomInfo |