gameServer/HWProtoLobbyState.hs
changeset 7668 4cb423f42105
parent 7537 833a0c34fafc
child 7677 f63c55db82eb
--- a/gameServer/HWProtoLobbyState.hs	Tue Sep 04 12:43:55 2012 +0200
+++ b/gameServer/HWProtoLobbyState.hs	Tue Sep 04 15:18:22 2012 +0400
@@ -6,6 +6,7 @@
 import Data.Maybe
 import Data.List
 import Control.Monad.Reader
+import qualified Data.ByteString.Char8 as B
 --------------------------------------
 import CoreTypes
 import Actions
@@ -69,6 +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 chans = map sendChan (cl : jRoomClients)
     let isBanned = host cl `elem` roomBansList jRoom
     return $
@@ -84,7 +86,8 @@
             [
                 MoveToRoom jRI,
                 AnswerClients [sendChan cl] $ "JOINED" : nicks,
-                AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl]
+                AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl],
+                AnswerClients [sendChan cl] $ ["WARNING", "Room owner is " `B.append` nick owner]
             ]
             ++ map (readynessMessage cl) jRoomClients
             ++ answerFullConfig cl (mapParams jRoom) (params jRoom)