# HG changeset patch
# User unc0rr
# Date 1360446733 -14400
# Node ID 9a65baafd7d741c42a81eef71ec0ce6a2e143d56
# Parent  7cae79214537a8ebaf9812c22533cbd9ac6e9dba
Send JOINING message in response to FOLLOW. Actual join may still fail due to room restrictions. Not tested.

diff -r 7cae79214537 -r 9a65baafd7d7 gameServer/HWProtoLobbyState.hs
--- a/gameServer/HWProtoLobbyState.hs	Sun Feb 10 01:45:25 2013 +0400
+++ b/gameServer/HWProtoLobbyState.hs	Sun Feb 10 01:52:13 2013 +0400
@@ -135,13 +135,14 @@
 
 handleCmd_lobby ["FOLLOW", asknick] = do
     (_, rnc) <- ask
+    clChan <- liftM sendChan thisClient
     ci <- clientByNick asknick
     let ri = clientRoom rnc $ fromJust ci
-    let clRoom = room rnc ri
+    let roomName = name $ room rnc ri
     if isNothing ci || ri == lobbyId then
         return []
         else
-        handleCmd_lobby ["JOIN_ROOM", name clRoom]
+        liftM ((:) (AnswerClients [clChan] ["JOINING", roomName])) $ handleCmd_lobby ["JOIN_ROOM", roomName]
 
     ---------------------------
     -- Administrator's stuff --