diff -r 6aba07ea908b -r c828cabe33af gameServer/EngineInteraction.hs --- a/gameServer/EngineInteraction.hs Wed Jun 03 23:24:56 2015 +0300 +++ b/gameServer/EngineInteraction.hs Thu Jun 04 19:57:04 2015 +0300 @@ -21,7 +21,7 @@ #if defined(OFFICIAL_SERVER) module EngineInteraction(replayToDemo, checkNetCmd, toEngineMsg, drawnMapData) where #else -module EngineInteraction(checkNetCmd, toEngineMsg, drawnMapData) where +module EngineInteraction(checkNetCmd, toEngineMsg) where #endif import qualified Data.Set as Set @@ -40,6 +40,7 @@ import CoreTypes import Utils +#if defined(OFFICIAL_SERVER) {- this is snippet from http://stackoverflow.com/questions/10043102/how-to-catch-the-decompress-ioerror because standard 'catch' doesn't seem to catch decompression errors for some reason @@ -55,6 +56,7 @@ cons chunk = right (chunk :) finalise = right BL.fromChunks {- end snippet -} +#endif toEngineMsg :: B.ByteString -> B.ByteString toEngineMsg msg = B.pack $ Base64.encode (fromIntegral (BW.length msg) : BW.unpack msg) @@ -157,7 +159,6 @@ ]) $ hedgehogs t ) -#endif drawnMapData :: B.ByteString -> [B.ByteString] drawnMapData = @@ -225,6 +226,4 @@ , 0x02000000 , 0x04000000 ] - - - +#endif