# HG changeset patch
# User unc0rr
# Date 1267466052 0
# Node ID 1566f05ca371ad8f716b0624fcc655f8680fe8a6
# Parent  6d2636144e1f17fb677ee10aea88afd2965897be
Fix problems with utf8-encoded nicknames in team chat (not tested)

diff -r 6d2636144e1f -r 1566f05ca371 gameServer/HWProtoInRoomState.hs
--- a/gameServer/HWProtoInRoomState.hs	Mon Mar 01 15:03:13 2010 +0000
+++ b/gameServer/HWProtoInRoomState.hs	Mon Mar 01 17:54:12 2010 +0000
@@ -204,7 +204,10 @@
         []
     where
         client = clients IntMap.! clID
-        engineMsg = toEngineMsg $ 'b' : (nick client ++ "(team): " ++ decodedMsg ++ "\x20\x20")
+        -- FIXME: why are those decoded* function used? 
+        -- it would be better to use ByteString instead of String
+        engineMsg = toEngineMsg $ 'b' : (decodedNick ++ "(team): " ++ decodedMsg ++ "\x20\x20")
         decodedMsg = UTF8.decodeString msg
+        decodedNick = UTF8.decodeString $ nick client
 
 handleCmd_inRoom clID _ _ _ = [ProtocolError "Incorrect command (state: in room)"]