Show client's room in info
authorunc0rr
Mon, 05 Jan 2009 19:51:24 +0000
changeset 1582 262245ba6ea6
parent 1581 2dfa315b4bb2
child 1583 30257fe3f9e9
Show client's room in info
netserver/HWProto.hs
--- a/netserver/HWProto.hs	Mon Jan 05 19:44:43 2009 +0000
+++ b/netserver/HWProto.hs	Mon Jan 05 19:51:24 2009 +0000
@@ -45,7 +45,9 @@
 answerConnected         = answerClientOnly ["CONNECTED", "Hedgewars server http://www.hedgewars.org/"]
 answerNotOwner          = answerClientOnly ["ERROR", "You do not own this team"]
 answerCannotCreateRoom  = answerClientOnly ["WARNING", "Cannot create more rooms"]
-answerInfo client       = answerClientOnly ["INFO", nick client, host client, proto2ver $ protocol client]
+answerInfo client       = answerClientOnly ["INFO", nick client, host client, proto2ver $ protocol client, roomInfo]
+	where
+	roomInfo = if not $ null $ room client then "room " ++ (room client) else "lobby"
 
 answerAbandoned           = answerOthersRoom ["BYE", "Room abandoned"]
 answerChatString nick msg = answerOthersRoom ["CHAT_STRING", nick, msg]