# HG changeset patch # User Mitchell Kember # Date 1354489970 18000 # Node ID 7c6e7492333d51ddcba141b6261a2e5c33dc3b8d # Parent ed50011152654dfd3a9ef0e3edd7d3d95b3b8124# Parent 3f03f0b6a385778f688fe28f71da4f48cdd5c71a Merged with upstream. diff -r ed5001115265 -r 7c6e7492333d gameServer/Actions.hs --- a/gameServer/Actions.hs Sun Dec 02 18:10:29 2012 -0500 +++ b/gameServer/Actions.hs Sun Dec 02 18:12:50 2012 -0500 @@ -441,17 +441,25 @@ return () -processAction (ProcessAccountInfo info) = +processAction (ProcessAccountInfo info) = do case info of HasAccount passwd isAdmin -> do - chan <- client's sendChan - mapM_ processAction [AnswerClients [chan] ["ASKPASSWORD"], ModifyClient (\c -> c{webPassword = passwd, isAdministrator = isAdmin})] - Guest -> - processAction JoinLobby + b <- isBanned + when (not b) $ do + chan <- client's sendChan + mapM_ processAction [AnswerClients [chan] ["ASKPASSWORD"], ModifyClient (\c -> c{webPassword = passwd, isAdministrator = isAdmin})] + Guest -> do + b <- isBanned + when (not b) $ + processAction JoinLobby Admin -> do mapM_ processAction [ModifyClient (\cl -> cl{isAdministrator = True}), JoinLobby] chan <- client's sendChan processAction $ AnswerClients [chan] ["ADMIN_ACCESS"] + where + isBanned = do + processAction CheckBanned + liftM B.null $ client's nick processAction JoinLobby = do diff -r ed5001115265 -r 7c6e7492333d gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Sun Dec 02 18:10:29 2012 -0500 +++ b/gameServer/HWProtoInRoomState.hs Sun Dec 02 18:12:50 2012 -0500 @@ -308,8 +308,8 @@ let sameRoom = clientRoom rnc thisClientId == clientRoom rnc banId if master && isJust maybeClientId && (banId /= thisClientId) && sameRoom then return [ - ModifyRoom (\r -> r{roomBansList = let h = host $ rnc `client` banId in h `deepseq` h : roomBansList r}) - , KickRoomClient banId +-- ModifyRoom (\r -> r{roomBansList = let h = host $ rnc `client` banId in h `deepseq` h : roomBansList r}) + KickRoomClient banId ] else return [] diff -r ed5001115265 -r 7c6e7492333d hedgewars/uSound.pas --- a/hedgewars/uSound.pas Sun Dec 02 18:10:29 2012 -0500 +++ b/hedgewars/uSound.pas Sun Dec 02 18:12:50 2012 -0500 @@ -386,7 +386,7 @@ if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then begin s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; - if (not FileExists(s)) and (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then + if (not pfsExists(s)) and (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then s:= cPathz[Soundz[sndFirePunch1].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); voicepack^.chunks[snd]:= Mix_LoadWAV_RW(rwopsOpenRead(s), 1);