# HG changeset patch # User unc0rr # Date 1376832557 -14400 # Node ID 2af7bea32e5ebf33d5529b48dbc667d1140cfdfe # Parent 1767c92eff378b9ef6a45c784597fbf926b1e601 - Some fixes to official server build - Encode stored message, fixes bug of r3f4c3fc146c2 diff -r 1767c92eff37 -r 2af7bea32e5e gameServer/Actions.hs --- a/gameServer/Actions.hs Sat Aug 17 23:38:53 2013 +0400 +++ b/gameServer/Actions.hs Sun Aug 18 17:29:17 2013 +0400 @@ -672,7 +672,8 @@ processAction (CheckSuccess info) = do Just (CheckInfo fileName teams) <- client's checkInfo - io $ writeChan (dbQueries si) $ StoreAchievement fileName (map toPair teams) info + si <- gets serverInfo + io $ writeChan (dbQueries si) $ StoreAchievements (B.pack fileName) (map toPair teams) info io $ moveCheckedRecord fileName where toPair t = (teamname t, teamowner t) diff -r 1767c92eff37 -r 2af7bea32e5e gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Sat Aug 17 23:38:53 2013 +0400 +++ b/gameServer/CoreTypes.hs Sun Aug 18 17:29:17 2013 +0400 @@ -263,7 +263,7 @@ CheckAccount ClientIndex Int B.ByteString B.ByteString | ClearCache | SendStats Int Int - | StoreAchievement [(B.ByteString, B.ByteString)] [B.ByteString] + | StoreAchievements B.ByteString [(B.ByteString, B.ByteString)] [B.ByteString] deriving (Show, Read) data CoreMessage = diff -r 1767c92eff37 -r 2af7bea32e5e gameServer/EngineInteraction.hs --- a/gameServer/EngineInteraction.hs Sat Aug 17 23:38:53 2013 +0400 +++ b/gameServer/EngineInteraction.hs Sun Aug 18 17:29:17 2013 +0400 @@ -43,7 +43,7 @@ lft = foldr l Nothing l m n = let m' = B.head $ B.tail m; tst = flip Set.member in if not $ tst timedMessages m' then n - else if '+' /= m' then Just Nothing else Just $ Just m + else if '+' /= m' then Just Nothing else Just . Just . B.pack . Base64.encode . BW.unpack $ m isNonEmpty = (/=) '+' . B.head . B.tail legalMessages = Set.fromList $ "M#+LlRrUuDdZzAaSjJ,sNpPwtghbc12345" ++ slotMessages slotMessages = "\128\129\130\131\132\133\134\135\136\137\138" diff -r 1767c92eff37 -r 2af7bea32e5e gameServer/OfficialServer/extdbinterface.hs --- a/gameServer/OfficialServer/extdbinterface.hs Sat Aug 17 23:38:53 2013 +0400 +++ b/gameServer/OfficialServer/extdbinterface.hs Sun Aug 18 17:29:17 2013 +0400 @@ -46,7 +46,7 @@ SendStats clients rooms -> run dbConn dbQueryStats [SqlInt32 $ fromIntegral clients, SqlInt32 $ fromIntegral rooms] >> return () - StoreAchievements -> return () + StoreAchievements {} -> return () dbConnectionLoop mySQLConnectionInfo =