equal
deleted
inserted
replaced
49 let cl = rnc `client` fromJust maybeClientId |
49 let cl = rnc `client` fromJust maybeClientId |
50 let roomId = clientRoom rnc clientId |
50 let roomId = clientRoom rnc clientId |
51 let clRoom = room rnc roomId |
51 let clRoom = room rnc roomId |
52 let roomMasterSign = if isMaster cl then "@" else "" |
52 let roomMasterSign = if isMaster cl then "@" else "" |
53 let adminSign = if isAdministrator cl then "@" else "" |
53 let adminSign = if isAdministrator cl then "@" else "" |
54 let roomInfo = if roomId /= lobbyId then B.concat [roomMasterSign, "room ", name clRoom] else adminSign `B.append` "lobby" |
54 let rInfo = if roomId /= lobbyId then B.concat [roomMasterSign, "room ", name clRoom] else adminSign `B.append` "lobby" |
55 let roomStatus = if isJust $ gameInfo clRoom then |
55 let roomStatus = if isJust $ gameInfo clRoom then |
56 if teamsInGame cl > 0 then "(playing)" else "(spectating)" |
56 if teamsInGame cl > 0 then "(playing)" else "(spectating)" |
57 else |
57 else |
58 "" |
58 "" |
59 let hostStr = if isAdminAsking then host cl else cutHost $ host cl |
59 let hostStr = if isAdminAsking then host cl else cutHost $ host cl |
63 answerClient [ |
63 answerClient [ |
64 "INFO", |
64 "INFO", |
65 nick cl, |
65 nick cl, |
66 B.concat ["[", hostStr, "]"], |
66 B.concat ["[", hostStr, "]"], |
67 protoNumber2ver $ clientProto cl, |
67 protoNumber2ver $ clientProto cl, |
68 B.concat ["[", roomInfo, "]", roomStatus] |
68 B.concat ["[", rInfo, "]", roomStatus] |
69 ] |
69 ] |
70 |
70 |
71 |
71 |
72 handleCmd_loggedin cmd = do |
72 handleCmd_loggedin cmd = do |
73 (ci, rnc) <- ask |
73 (ci, rnc) <- ask |