module HsBot.IRC.User where import List import HsBot.General.Render data User = User { userName :: String, userPts :: Int } deriving (Show, Read) instance Eq User where x == y = (userPts x) == (userPts y) instance Ord User where x < y = (userPts x) < (userPts y) x > y = (userPts x) > (userPts y) x >= y = not (x < y) x <= y = not (x > y) instance Render User where render user = userName user ++ ": " ++ (show $ userPts user) ++ "pts" userEquals :: User -> User -> Bool userEquals x y = (userName x) == (userName y)