# HG changeset patch # User unc0rr # Date 1250167524 0 # Node ID 977ee15c3c1faf3b4f71b12987350dec7585a3c7 # Parent 581e59f123a27b811a7bcf74f3a05b5b399e3e41 Show player's room status (plays/spectates) diff -r 581e59f123a2 -r 977ee15c3c1f gameServer/HWProtoCore.hs --- a/gameServer/HWProtoCore.hs Thu Aug 13 08:54:20 2009 +0000 +++ b/gameServer/HWProtoCore.hs Thu Aug 13 12:45:24 2009 +0000 @@ -48,7 +48,7 @@ nick client, "[" ++ host client ++ "]", protoNumber2ver $ clientProto client, - "[" ++ roomInfo ++ "]"]] + "[" ++ roomInfo ++ "]" ++ roomStatus]] where maybeClient = find (\cl -> asknick == nick cl) clients noSuchClient = isNothing maybeClient @@ -57,6 +57,10 @@ roomInfo = if roomID client /= 0 then roomMasterSign ++ "room " ++ (name room) else adminSign ++ "lobby" roomMasterSign = if isMaster client then "@" else "" adminSign = if isAdministrator client then "@" else "" + roomStatus = + if gameinprogress room + then if teamsInGame client > 0 then "(plays)" else "(spectates)" + else "" handleCmd_loggedin clID clients rooms cmd =