Merged with upstream.
authorMitchell Kember <mk12360@gmail.com>
Sun, 02 Dec 2012 18:12:50 -0500
changeset 8198 7c6e7492333d
parent 8196 ed5001115265 (current diff)
parent 8191 3f03f0b6a385 (diff)
child 8200 90f524718f3d
Merged with upstream.
--- 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
--- 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 []
--- 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);