# HG changeset patch # User koda # Date 1354495432 -3600 # Node ID 10144ac42d1c2dfa208f33c965fc14dcf8389f75 # Parent 3f03f0b6a385778f688fe28f71da4f48cdd5c71a# Parent 4c166505e5c81e1328964bce1e32345ed6bddd37 MERGE diff -r 4c166505e5c8 -r 10144ac42d1c gameServer/Actions.hs --- a/gameServer/Actions.hs Sun Dec 02 23:41:01 2012 +0100 +++ b/gameServer/Actions.hs Mon Dec 03 01:43:52 2012 +0100 @@ -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 4c166505e5c8 -r 10144ac42d1c gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Sun Dec 02 23:41:01 2012 +0100 +++ b/gameServer/HWProtoInRoomState.hs Mon Dec 03 01:43:52 2012 +0100 @@ -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 4c166505e5c8 -r 10144ac42d1c hedgewars/uSound.pas --- a/hedgewars/uSound.pas Sun Dec 02 23:41:01 2012 +0100 +++ b/hedgewars/uSound.pas Mon Dec 03 01:43:52 2012 +0100 @@ -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);