gameServer/Opts.hs
changeset 4905 7842d085acf4
parent 4568 f85243bf890e
child 4932 f11d80bac7ed
--- 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