--- a/gameServer/Opts.hs Wed Feb 02 11:28:38 2011 +0300
+++ b/gameServer/Opts.hs Wed Feb 02 21:23:12 2011 +0300
@@ -3,10 +3,12 @@
getOpts,
) where
-import System.Environment ( getArgs )
+import System.Environment
import System.Console.GetOpt
import Network
import Data.Maybe ( fromMaybe )
+import qualified Data.ByteString.Char8 as B
+
import CoreTypes
import Utils
@@ -30,9 +32,9 @@
where
readDedicated = fromMaybe True (maybeRead str :: Maybe Bool)
-readDbLogin str opts = opts{dbLogin = str}
-readDbPassword str opts = opts{dbPassword = str}
-readDbHost str opts = opts{dbHost = str}
+readDbLogin str opts = opts{dbLogin = B.pack str}
+readDbPassword str opts = opts{dbPassword = B.pack str}
+readDbHost str opts = opts{dbHost = B.pack str}
getOpts :: ServerInfo -> IO ServerInfo
getOpts opts = do