10 import Data.Function |
10 import Data.Function |
11 import Data.ByteString.Char8 as B |
11 import Data.ByteString.Char8 as B |
12 import Data.Unique |
12 import Data.Unique |
13 import Control.Exception |
13 import Control.Exception |
14 import Data.Typeable |
14 import Data.Typeable |
|
15 import Data.TConfig |
15 ----------------------- |
16 ----------------------- |
16 import RoomsAndClients |
17 import RoomsAndClients |
17 |
18 |
18 type ClientChan = Chan [B.ByteString] |
19 type ClientChan = Chan [B.ByteString] |
19 |
20 |
139 dbPassword :: B.ByteString, |
140 dbPassword :: B.ByteString, |
140 lastLogins :: [(B.ByteString, (UTCTime, B.ByteString))], |
141 lastLogins :: [(B.ByteString, (UTCTime, B.ByteString))], |
141 restartPending :: Bool, |
142 restartPending :: Bool, |
142 coreChan :: Chan CoreMessage, |
143 coreChan :: Chan CoreMessage, |
143 dbQueries :: Chan DBQuery, |
144 dbQueries :: Chan DBQuery, |
144 serverConfig :: Maybe c |
145 serverConfig :: Maybe Conf |
145 } |
146 } |
146 |
147 |
147 instance Show (ServerInfo c) where |
148 instance Show ServerInfo where |
148 show _ = "Server Info" |
149 show _ = "Server Info" |
149 |
150 |
150 newServerInfo :: Chan CoreMessage -> Chan DBQuery -> Maybe c -> ServerInfo c |
151 newServerInfo :: Chan CoreMessage -> Chan DBQuery -> Maybe Conf -> ServerInfo |
151 newServerInfo = |
152 newServerInfo = |
152 ServerInfo |
153 ServerInfo |
153 True |
154 True |
154 "<h2><p align=center><a href=\"http://www.hedgewars.org/\">http://www.hedgewars.org/</a></p></h2>" |
155 "<h2><p align=center><a href=\"http://www.hedgewars.org/\">http://www.hedgewars.org/</a></p></h2>" |
155 "<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>" |
156 "<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>" |