gameServer/Actions.hs
changeset 5008 af9e4a66111b
parent 5007 c401891fe5e0
child 5030 42746c5d4a80
equal deleted inserted replaced
5007:c401891fe5e0 5008:af9e4a66111b
   409             , AddIP2Bans (host cl) "Reconnected too fast" (addUTCTime 10 $ connectTime cl)
   409             , AddIP2Bans (host cl) "Reconnected too fast" (addUTCTime 10 $ connectTime cl)
   410         ]
   410         ]
   411 
   411 
   412 
   412 
   413 processAction (AddNick2Bans n reason expiring) = do
   413 processAction (AddNick2Bans n reason expiring) = do
   414         processAction $ ModifyServerInfo (\s -> s{bans = BanByNick n reason expiring : bans s})
   414     processAction $ ModifyServerInfo (\s -> s{bans = BanByNick n reason expiring : bans s})
   415 
   415 
   416 processAction (AddIP2Bans ip reason expiring) = do
   416 processAction (AddIP2Bans ip reason expiring) = do
   417         processAction $ ModifyServerInfo (\s -> s{bans = BanByIP ip reason expiring : bans s})
   417     (Just ci) <- gets clientIndex
       
   418     rc <- gets removedClients
       
   419     when (not $ ci `Set.member` rc)
       
   420         $ processAction $ ModifyServerInfo (\s -> s{bans = BanByIP ip reason expiring : bans s})
   418 
   421 
   419 processAction CheckBanned = do
   422 processAction CheckBanned = do
   420     clTime <- client's connectTime
   423     clTime <- client's connectTime
   421     clNick <- client's nick
   424     clNick <- client's nick
   422     clHost <- client's host
   425     clHost <- client's host