gameServer/Actions.hs
changeset 4909 dc6482438674
parent 4907 8bf14795a528
child 4914 5c33bb53c1e5
equal deleted inserted replaced
4908:99d6797b7ff4 4909:dc6482438674
   364 processAction (BanClient seconds reason banId) = do
   364 processAction (BanClient seconds reason banId) = do
   365     modify (\s -> s{clientIndex = Just banId})
   365     modify (\s -> s{clientIndex = Just banId})
   366     clHost <- client's host
   366     clHost <- client's host
   367     currentTime <- io $ getCurrentTime
   367     currentTime <- io $ getCurrentTime
   368     let msg = "Ban for " `B.append` (B.pack . show $ seconds) `B.append` "seconds (" `B.append` msg` B.append` ")"
   368     let msg = "Ban for " `B.append` (B.pack . show $ seconds) `B.append` "seconds (" `B.append` msg` B.append` ")"
   369     processAction $ ModifyServerInfo (\s -> s{lastLogins = (clHost, (addUTCTime seconds $ currentTime, msg)) : lastLogins s})
   369     mapM_ processAction [
       
   370         ModifyServerInfo (\s -> s{lastLogins = (clHost, (addUTCTime seconds $ currentTime, msg)) : lastLogins s})
       
   371         , KickClient banId
       
   372         ]
   370 
   373 
   371 
   374 
   372 processAction (KickRoomClient kickId) = do
   375 processAction (KickRoomClient kickId) = do
   373     modify (\s -> s{clientIndex = Just kickId})
   376     modify (\s -> s{clientIndex = Just kickId})
   374     ch <- client's sendChan
   377     ch <- client's sendChan