# HG changeset patch
# User unc0rr
# Date 1351837072 -14400
# Node ID 550083f61a0ea826cd847ba25bd9d47c3c1c8f1f
# Parent  351f970c60e18c3c0ddaa19f36413289fa84325e
oops, fix incorrect room owner name in ROOM UPD command again

diff -r 351f970c60e1 -r 550083f61a0e gameServer/Actions.hs
--- a/gameServer/Actions.hs	Fri Nov 02 10:07:30 2012 +0400
+++ b/gameServer/Actions.hs	Fri Nov 02 10:17:52 2012 +0400
@@ -255,7 +255,7 @@
     proto <- client's clientProto
     ri <- clientRoomA
     rnc <- gets roomsClients
-    newMasterId <- liftM (head . filter (/= ci)) . io $ roomClientsIndicesM rnc ri
+    newMasterId <- liftM (last . filter (/= ci)) . io $ roomClientsIndicesM rnc ri
     newMaster <- io $ client'sM rnc id newMasterId
     oldRoomName <- io $ room'sM rnc name ri
     oldMaster <- client's nick
@@ -326,8 +326,8 @@
     rnc <- gets roomsClients
     ri <- io $ clientRoomM rnc clId
     rm <- io $ room'sM rnc id ri
+    n <- io $ client'sM rnc nick (masterID rm)
     chans <- liftM (map sendChan) $! sameProtoClientsS proto
-    n <- client's nick
     processAction $ AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo n rm)