# HG changeset patch # User unc0rr # Date 1239393402 0 # Node ID fd9c8e3c734de99972593796e710953f5165bba2 # Parent aed76eabb846464e61994553a83811d4d4179855 Add a special message for old hedgewars versions diff -r aed76eabb846 -r fd9c8e3c734d gameServer/Actions.hs --- a/gameServer/Actions.hs Fri Apr 10 19:51:44 2009 +0000 +++ b/gameServer/Actions.hs Fri Apr 10 19:56:42 2009 +0000 @@ -96,8 +96,14 @@ processAction (clID, serverInfo, clients, rooms) SendServerMessage = do - writeChan (sendChan $ clients ! clID) $ ["SERVER_MESSAGE", serverMessage serverInfo] + writeChan (sendChan $ clients ! clID) $ ["SERVER_MESSAGE", message serverInfo] return (clID, serverInfo, clients, rooms) + where + client = clients ! clID + message = if clientProto client < 25 then + serverMessageForOldVersions + else + serverMessageForOldVersions processAction (clID, serverInfo, clients, rooms) (ProtocolError msg) = do diff -r aed76eabb846 -r fd9c8e3c734d gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Fri Apr 10 19:51:44 2009 +0000 +++ b/gameServer/CoreTypes.hs Fri Apr 10 19:56:42 2009 +0000 @@ -116,6 +116,7 @@ { isDedicated :: Bool, serverMessage :: String, + serverMessageForOldVersions :: String, listenPort :: PortNumber, loginsNumber :: Int, nextRoomID :: Int, @@ -135,6 +136,7 @@ ServerInfo True "

http://www.hedgewars.org/

" + "

Hedgewars 0.9.10 is out! Please, update. Support for previous versions IS DROPPED

Download page here

New features are:

" 46631 0 0 diff -r aed76eabb846 -r fd9c8e3c734d gameServer/Utils.hs --- a/gameServer/Utils.hs Fri Apr 10 19:51:44 2009 +0000 +++ b/gameServer/Utils.hs Fri Apr 10 19:56:42 2009 +0000 @@ -65,5 +65,6 @@ protoNumber2ver 23 = "0.9.9" protoNumber2ver 24 = "0.9.10-dev" protoNumber2ver 25 = "0.9.10" +protoNumber2ver 26 = "0.9.11-dev" protoNumber2ver _ = "Unknown"