diff -r d7bddb280f4f -r 6913d677c891 gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Sun Mar 13 15:09:29 2011 +0300 +++ b/gameServer/CoreTypes.hs Sun Mar 13 15:20:07 2011 +0300 @@ -39,9 +39,6 @@ teamsInGame :: Word } -instance Show ClientInfo where - show ci = " nick: " ++ unpack (nick ci) ++ " host: " ++ unpack (host ci) - instance Eq ClientInfo where (==) = (==) `on` clientSocket @@ -64,11 +61,6 @@ hedgehogs :: [HedgehogInfo] } -instance Show TeamInfo where - show ti = "owner: " ++ unpack (teamowner ti) - ++ "name: " ++ unpack (teamname ti) - ++ "color: " ++ unpack (teamcolor ti) - data RoomInfo = RoomInfo { @@ -89,11 +81,6 @@ params :: Map.Map B.ByteString [B.ByteString] } -instance Show RoomInfo where - show ri = ", players: " ++ show (playersIn ri) - ++ ", ready: " ++ show (readyPlayers ri) - ++ ", teams: " ++ show (teams ri) - newRoom :: RoomInfo newRoom = RoomInfo @@ -145,8 +132,6 @@ serverConfig :: Maybe Conf } -instance Show ServerInfo where - show _ = "Server Info" newServerInfo :: Chan CoreMessage -> Chan DBQuery -> Maybe Conf -> ServerInfo newServerInfo = @@ -184,13 +169,6 @@ | TimerAction Int | Remove ClientIndex -instance Show CoreMessage where - show (Accept _) = "Accept" - show (ClientMessage _) = "ClientMessage" - show (ClientAccountInfo {}) = "ClientAccountInfo" - show (TimerAction _) = "TimerAction" - show (Remove _) = "Remove" - type MRnC = MRoomsAndClients RoomInfo ClientInfo type IRnC = IRoomsAndClients RoomInfo ClientInfo @@ -212,3 +190,8 @@ instance Show ShutdownThreadException where show (ShutdownThreadException s) = s instance Exception ShutdownThreadException + +data BanInfo = + BanByIP String UTCTime + | BanByNickname String UTCTime + deriving (Show, Read)