equal
deleted
inserted
replaced
20 where |
20 where |
21 clChan = sendChan cl |
21 clChan = sendChan cl |
22 toAnswer team = |
22 toAnswer team = |
23 [AnswerClients [clChan] $ teamToNet team, |
23 [AnswerClients [clChan] $ teamToNet team, |
24 AnswerClients [clChan] ["TEAM_COLOR", teamname team, teamcolor team], |
24 AnswerClients [clChan] ["TEAM_COLOR", teamname team, teamcolor team], |
25 AnswerClients [clChan] ["HH_NUM", teamname team, B.pack . show $ hhnum team]] |
25 AnswerClients [clChan] ["HH_NUM", teamname team, showB $ hhnum team]] |
26 |
26 |
27 handleCmd_lobby :: CmdHandler |
27 handleCmd_lobby :: CmdHandler |
28 |
28 |
29 |
29 |
30 handleCmd_lobby ["LIST"] = do |
30 handleCmd_lobby ["LIST"] = do |
167 |
167 |
168 handleCmd_lobby ["SET_SERVER_VAR", "LATEST_PROTO", protoNum] = do |
168 handleCmd_lobby ["SET_SERVER_VAR", "LATEST_PROTO", protoNum] = do |
169 cl <- thisClient |
169 cl <- thisClient |
170 return [ModifyServerInfo (\si -> si{latestReleaseVersion = readNum}) | isAdministrator cl && readNum > 0] |
170 return [ModifyServerInfo (\si -> si{latestReleaseVersion = readNum}) | isAdministrator cl && readNum > 0] |
171 where |
171 where |
172 readNum = case B.readInt protoNum of |
172 readNum = readInt_ protoNum |
173 Just (i, t) | B.null t -> fromIntegral i |
173 |
174 _ -> 0 |
|
175 |
|
176 handleCmd_lobby ["GET_SERVER_VAR"] = do |
174 handleCmd_lobby ["GET_SERVER_VAR"] = do |
177 cl <- thisClient |
175 cl <- thisClient |
178 return [SendServerVars | isAdministrator cl] |
176 return [SendServerVars | isAdministrator cl] |
179 |
177 |
180 handleCmd_lobby ["CLEAR_ACCOUNTS_CACHE"] = do |
178 handleCmd_lobby ["CLEAR_ACCOUNTS_CACHE"] = do |