169 [] |
168 [] |
170 |
169 |
171 data RoomInfo = |
170 data RoomInfo = |
172 RoomInfo |
171 RoomInfo |
173 { |
172 { |
174 masterID :: ClientIndex, |
173 masterID :: Maybe ClientIndex, |
175 name :: B.ByteString, |
174 name :: B.ByteString, |
176 password :: B.ByteString, |
175 password :: B.ByteString, |
177 roomProto :: Word16, |
176 roomProto :: Word16, |
178 teams :: [TeamInfo], |
177 teams :: [TeamInfo], |
179 gameInfo :: Maybe GameInfo, |
178 gameInfo :: Maybe GameInfo, |
180 playersIn :: !Int, |
179 playersIn :: !Int, |
181 readyPlayers :: !Int, |
180 readyPlayers :: !Int, |
182 isRestrictedJoins :: Bool, |
181 isRestrictedJoins :: Bool, |
183 isRestrictedTeams :: Bool, |
182 isRestrictedTeams :: Bool, |
184 isRegisteredOnly :: Bool, |
183 isRegisteredOnly :: Bool, |
|
184 isSpecial :: Bool, |
|
185 greeting :: B.ByteString, |
185 roomBansList :: ![B.ByteString], |
186 roomBansList :: ![B.ByteString], |
186 mapParams :: Map.Map B.ByteString B.ByteString, |
187 mapParams :: Map.Map B.ByteString B.ByteString, |
187 params :: Map.Map B.ByteString [B.ByteString] |
188 params :: Map.Map B.ByteString [B.ByteString] |
188 } |
189 } |
189 |
190 |
190 newRoom :: RoomInfo |
191 newRoom :: RoomInfo |
191 newRoom = |
192 newRoom = |
192 RoomInfo |
193 RoomInfo |
193 (error "No room master defined") |
194 Nothing |
194 "" |
195 "" |
195 "" |
196 "" |
196 0 |
197 0 |
197 [] |
198 [] |
198 Nothing |
199 Nothing |
199 0 |
200 0 |
200 0 |
201 0 |
201 False |
202 False |
202 False |
203 False |
203 False |
204 False |
|
205 False |
|
206 "" |
204 [] |
207 [] |
205 ( |
208 ( |
206 Map.fromList $ Prelude.zipWith (,) |
209 Map.fromList $ Prelude.zip |
207 ["MAP", "MAPGEN", "MAZE_SIZE", "SEED", "TEMPLATE"] |
210 ["MAP", "MAPGEN", "MAZE_SIZE", "SEED", "TEMPLATE"] |
208 ["+rnd+", "0", "0", "seed", "0"] |
211 ["+rnd+", "0", "0", "seed", "0"] |
209 ) |
212 ) |
210 (Map.singleton "SCHEME" ["Default"]) |
213 ( |
|
214 Map.fromList $ Prelude.zip |
|
215 ["SCHEME", "SCRIPT"] |
|
216 [["Default"], ["Normal"]] |
|
217 ) |
|
218 |
211 |
219 |
212 data StatisticsInfo = |
220 data StatisticsInfo = |
213 StatisticsInfo |
221 StatisticsInfo |
214 { |
222 { |
215 playersNumber :: Int, |
223 playersNumber :: Int, |
265 |
273 |
266 data DBQuery = |
274 data DBQuery = |
267 CheckAccount ClientIndex Int B.ByteString B.ByteString |
275 CheckAccount ClientIndex Int B.ByteString B.ByteString |
268 | ClearCache |
276 | ClearCache |
269 | SendStats Int Int |
277 | SendStats Int Int |
270 | StoreAchievements B.ByteString [(B.ByteString, B.ByteString)] [B.ByteString] |
278 | StoreAchievements Word16 B.ByteString [(B.ByteString, B.ByteString)] [B.ByteString] |
271 | GetReplayName ClientIndex Int B.ByteString |
279 | GetReplayName ClientIndex Int B.ByteString |
272 deriving (Show, Read) |
280 deriving (Show, Read) |
273 |
281 |
274 data CoreMessage = |
282 data CoreMessage = |
275 Accept ClientInfo |
283 Accept ClientInfo |