gameServer/HWProtoCore.hs
changeset 2706 935b7d618cf0
parent 2318 f3407513dc42
child 2867 9be6693c78cb
--- a/gameServer/HWProtoCore.hs	Sun Jan 24 13:37:03 2010 +0000
+++ b/gameServer/HWProtoCore.hs	Sun Jan 24 13:38:14 2010 +0000
@@ -63,6 +63,20 @@
 			else ""
 
 
+handleCmd_loggedin clID clients rooms ["FOLLOW", asknick] =
+	if inLobby || noSuchClient then
+		[]
+	else
+		handleCmd_lobby clID clients rooms ["JOIN_ROOM", roomname]
+	where
+		maybeClient = find (\cl -> asknick == nick cl) clients
+		noSuchClient = isNothing maybeClient
+		client = fromJust maybeClient
+		room = rooms IntMap.! roomID client
+		roomname = (name room)
+		inLobby = roomname == ""
+
+
 handleCmd_loggedin clID clients rooms cmd =
 	if roomID client == 0 then
 		handleCmd_lobby clID clients rooms cmd