--- a/gameServer/ConfigFile.hs Sat Mar 05 22:23:14 2011 +0300
+++ b/gameServer/ConfigFile.hs Sat Mar 05 22:39:26 2011 +0300
@@ -14,11 +14,16 @@
, dbName = value "dbName" cfg
, dbLogin = value "dbLogin" cfg
, dbPassword = value "dbPassword" cfg
+ , serverMessage = value "sv_message" cfg
+ , serverMessageForOldVersions = value "sv_messageOld" cfg
+ , latestReleaseVersion = read . fromJust $ getValue "sv_latestProto" cfg
, serverConfig = Just cfg
}
return si
where
- value n c = B.pack . fromJust $ getValue n c
+ value n c = B.pack . fromJust2 n $ getValue n c
+ fromJust2 n Nothing = error $ "Missing config entry " ++ n
+ fromJust2 _ (Just a) = a
writeServerConfig :: ServerInfo c -> IO ()
writeServerConfig = undefined
--- a/gameServer/CoreTypes.hs Sat Mar 05 22:23:14 2011 +0300
+++ b/gameServer/CoreTypes.hs Sat Mar 05 22:39:26 2011 +0300
@@ -130,6 +130,7 @@
serverMessage :: B.ByteString,
serverMessageForOldVersions :: B.ByteString,
latestReleaseVersion :: Word16,
+ earliestCompatibleVersion :: Word16,
listenPort :: PortNumber,
nextRoomID :: Int,
dbHost :: B.ByteString,
@@ -151,8 +152,9 @@
ServerInfo
True
"<h2><p align=center><a href=\"http://www.hedgewars.org/\">http://www.hedgewars.org/</a></p></h2>"
- "<font color=yellow><h3 align=center>Hedgewars 0.9.14.1 is out! Please update.</h3><p align=center><a href=http://hedgewars.org/download.html>Download page here</a></font>"
- 35
+ "<font color=yellow><h3 align=center>Hedgewars 0.9.16 is out! Please update.</h3><p align=center><a href=http://hedgewars.org/download.html>Download page here</a></font>"
+ 39
+ 31 -- 0.9.13
46631
0
""