gameServer/Actions.hs
changeset 6733 5abbc345a82f
parent 6541 08ed346ed341
child 6753 e95b1f62d0de
--- a/gameServer/Actions.hs	Thu Feb 23 00:46:03 2012 +0400
+++ b/gameServer/Actions.hs	Thu Feb 23 18:41:52 2012 +0400
@@ -236,6 +236,7 @@
     rnc <- gets roomsClients
     newMasterId <- liftM (head . filter (/= ci)) . io $ roomClientsIndicesM rnc ri
     newMaster <- io $ client'sM rnc id newMasterId
+    oldRoomName <- io $ room'sM rnc name ri
     let newRoomName = nick newMaster
     mapM_ processAction [
         ModifyRoom (\r -> r{masterID = newMasterId, name = newRoomName}),
@@ -246,7 +247,7 @@
     proto <- client's clientProto
     newRoom <- io $ room'sM rnc id ri
     chans <- liftM (map sendChan) $! sameProtoClientsS proto
-    processAction $ AnswerClients chans ("ROOM" : "ADD" : roomInfo (nick newMaster) newRoom)
+    processAction $ AnswerClients chans ("ROOM" : "UPD" : oldRoomName : roomInfo (nick newMaster) newRoom)
 
 processAction (AddRoom roomName roomPassword) = do
     Just clId <- gets clientIndex