Ooops.. enable back DoS protection
authorunc0rr
Thu, 02 Apr 2009 18:50:08 +0000
changeset 1931 ffe420e9e61a
parent 1930 e71c24f11483
child 1932 f586d75c8b6a
Ooops.. enable back DoS protection
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