gameServer/Actions.hs
changeset 8155 0bccee1d31da
parent 8154 0ea76ea45e6a
child 8156 3ccc61102b58
equal deleted inserted replaced
8154:0ea76ea45e6a 8155:0bccee1d31da
   570         : [ByeClient (getBanReason $ fromJust ban) | isJust ban]
   570         : [ByeClient (getBanReason $ fromJust ban) | isJust ban]
   571     where
   571     where
   572         checkNotExpired testTime (BanByIP _ _ time) = testTime `diffUTCTime` time <= 0
   572         checkNotExpired testTime (BanByIP _ _ time) = testTime `diffUTCTime` time <= 0
   573         checkNotExpired testTime (BanByNick _ _ time) = testTime `diffUTCTime` time <= 0
   573         checkNotExpired testTime (BanByNick _ _ time) = testTime `diffUTCTime` time <= 0
   574         checkBan ip _ (BanByIP bip _ _) = bip `B.isPrefixOf` ip
   574         checkBan ip _ (BanByIP bip _ _) = bip `B.isPrefixOf` ip
   575         checkBan _ n (BanByNick bn _ _) = bn == n
   575         checkBan _ n (BanByNick bn _ _) = caseInsensitiveCompare bn n
   576         getBanReason (BanByIP _ msg _) = msg
   576         getBanReason (BanByIP _ msg _) = msg
   577         getBanReason (BanByNick _ msg _) = msg
   577         getBanReason (BanByNick _ msg _) = msg
   578 
   578 
   579 processAction PingAll = do
   579 processAction PingAll = do
   580     rnc <- gets roomsClients
   580     rnc <- gets roomsClients