gameServer/HWProtoLobbyState.hs
changeset 7682 f6bfbe829008
parent 7677 f63c55db82eb
child 7748 f160fbc139b1
--- a/gameServer/HWProtoLobbyState.hs	Sun Sep 09 15:37:10 2012 +0400
+++ b/gameServer/HWProtoLobbyState.hs	Sun Sep 09 19:57:13 2012 +0400
@@ -70,7 +70,7 @@
     let sameProto = clientProto cl == roomProto jRoom
     let jRoomClients = map (client irnc) $ roomClients irnc jRI
     let nicks = map nick jRoomClients
-    let owner = fromJust $ find isMaster jRoomClients
+    let ownerNick = nick . fromJust $ find isMaster jRoomClients
     let chans = map sendChan (cl : jRoomClients)
     let isBanned = host cl `elem` roomBansList jRoom
     return $
@@ -84,10 +84,11 @@
             [NoticeMessage WrongPassword]
             else
             [
-                MoveToRoom jRI,
-                AnswerClients [sendChan cl] $ "JOINED" : nicks,
-                AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl],
-                AnswerClients [sendChan cl] $ ["WARNING", "Room admin is " `B.append` nick owner]
+                MoveToRoom jRI
+                , AnswerClients [sendChan cl] $ "JOINED" : nicks
+                , AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl]
+                , AnswerClients [sendChan cl] $ ["WARNING", "Room admin is " `B.append` ownerNick]
+                , AnswerClients [sendChan cl] $ ["CLIENT_FLAGS", "+h", ownerNick]
             ]
             ++ map (readynessMessage cl) jRoomClients
             ++ answerFullConfig cl (mapParams jRoom) (params jRoom)