# HG changeset patch # User unc0rr # Date 1298475491 -10800 # Node ID 3684faf5b3d1ee5ec8ecf8eaf66e7faf95ab6618 # Parent 84543ecae8c3b24fa6f8aa97cccdda8d2c2343d6 Remove deprecated statistics MVar diff -r 84543ecae8c3 -r 3684faf5b3d1 gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Wed Feb 23 18:34:07 2011 +0300 +++ b/gameServer/CoreTypes.hs Wed Feb 23 18:38:11 2011 +0300 @@ -136,7 +136,6 @@ dbPassword :: B.ByteString, lastLogins :: [(B.ByteString, (UTCTime, B.ByteString))], restartPending :: Bool, - stats :: TMVar StatisticsInfo, coreChan :: Chan CoreMessage, dbQueries :: Chan DBQuery } @@ -144,7 +143,7 @@ instance Show ServerInfo where show _ = "Server Info" -newServerInfo :: TMVar StatisticsInfo -> Chan CoreMessage -> Chan DBQuery -> ServerInfo +newServerInfo :: Chan CoreMessage -> Chan DBQuery -> ServerInfo newServerInfo = ServerInfo True diff -r 84543ecae8c3 -r 3684faf5b3d1 gameServer/Opts.hs --- a/gameServer/Opts.hs Wed Feb 23 18:34:07 2011 +0300 +++ b/gameServer/Opts.hs Wed Feb 23 18:38:11 2011 +0300 @@ -7,10 +7,6 @@ import System.Environment import System.Console.GetOpt import Data.Maybe ( fromMaybe ) -#if defined(OFFICIAL_SERVER) -import qualified Data.ByteString.Char8 as B -import Network -#endif ------------------- import CoreTypes import Utils @@ -23,11 +19,6 @@ readListenPort , readDedicated -#if defined(OFFICIAL_SERVER) - , readDbLogin - , readDbPassword - readDbHost -#endif :: String -> ServerInfo -> ServerInfo @@ -39,12 +30,6 @@ where readDed = fromMaybe True (maybeRead str :: Maybe Bool) -#if defined(OFFICIAL_SERVER) -readDbLogin str opts = opts{dbLogin = B.pack str} -readDbPassword str opts = opts{dbPassword = B.pack str} -readDbHost str opts = opts{dbHost = B.pack str} -#endif - getOpts :: ServerInfo -> IO ServerInfo getOpts opts = do args <- getArgs diff -r 84543ecae8c3 -r 3684faf5b3d1 gameServer/hedgewars-server.hs --- a/gameServer/hedgewars-server.hs Wed Feb 23 18:34:07 2011 +0300 +++ b/gameServer/hedgewars-server.hs Wed Feb 23 18:38:11 2011 +0300 @@ -4,7 +4,6 @@ import Network.Socket import Network.BSD -import Control.Concurrent.STM import Control.Concurrent.Chan import qualified Control.Exception as Exception import System.Log.Logger @@ -36,10 +35,9 @@ setupLoggers - stats' <- atomically $ newTMVar (StatisticsInfo 0 0) dbQueriesChan <- newChan coreChan' <- newChan - serverInfo' <- getOpts $ newServerInfo stats' coreChan' dbQueriesChan + serverInfo' <- getOpts $ newServerInfo coreChan' dbQueriesChan #if defined(OFFICIAL_SERVER) dbHost' <- askFromConsole "DB host: "