gameServer/HWProtoCore.hs
changeset 5060 7d0f6e5b1c1c
parent 5030 42746c5d4a80
child 5996 2c72fe81dd37
--- a/gameServer/HWProtoCore.hs	Mon Mar 28 20:30:15 2011 +0400
+++ b/gameServer/HWProtoCore.hs	Mon Mar 28 20:31:01 2011 +0400
@@ -43,6 +43,7 @@
 handleCmd_loggedin ["INFO", asknick] = do
     (_, rnc) <- ask
     maybeClientId <- clientByNick asknick
+    isAdminAsking <- liftM isAdministrator thisClient
     let noSuchClient = isNothing maybeClientId
     let clientId = fromJust maybeClientId
     let cl = rnc `client` fromJust maybeClientId
@@ -55,13 +56,14 @@
             if teamsInGame cl > 0 then "(playing)" else "(spectating)"
             else
             ""
+    let hostStr = if isAdminAsking then host cl else cutHost $ host cl
     if noSuchClient then
         return []
         else
         answerClient [
             "INFO",
             nick cl,
-            B.concat ["[", host cl, "]"],
+            B.concat ["[", hostStr, "]"],
             protoNumber2ver $ clientProto cl,
             B.concat ["[", roomInfo, "]", roomStatus]
             ]