# HG changeset patch # User unc0rr # Date 1238698208 0 # Node ID ffe420e9e61a18cc3e26134a360f7d63ef4d2ddd # Parent e71c24f114838259b298de1c85529d2f6ee2d458 Ooops.. enable back DoS protection diff -r e71c24f11483 -r ffe420e9e61a gameServer/Actions.hs --- a/gameServer/Actions.hs Thu Apr 02 18:49:08 2009 +0000 +++ b/gameServer/Actions.hs Thu Apr 02 18:50:08 2009 +0000 @@ -342,10 +342,10 @@ let newLogins = takeWhile (\(_ , time) -> (connectTime client) `diffUTCTime` time <= 20) $ lastLogins serverInfo --- if isJust $ host client `Prelude.lookup` newLogins then --- processAction (clID, serverInfo{lastLogins = newLogins}, updatedClients, rooms) $ ByeClient "Reconnected too fast" --- else - return (clID, serverInfo{lastLogins = (host client, connectTime client) : newLogins}, updatedClients, rooms) + if isJust $ host client `Prelude.lookup` newLogins then + processAction (clID, serverInfo{lastLogins = newLogins}, updatedClients, rooms) $ ByeClient "Reconnected too fast" + else + return (clID, serverInfo{lastLogins = (host client, connectTime client) : newLogins}, updatedClients, rooms) processAction (clID, serverInfo, clients, rooms) PingAll = do