diff -r 8ef80bd0402f -r 52e293f14977 gameServer/Utils.hs --- a/gameServer/Utils.hs Thu Jan 23 14:18:06 2014 +0100 +++ b/gameServer/Utils.hs Thu Jan 23 21:54:26 2014 +0400 @@ -56,8 +56,9 @@ t : replaceTeam tm ts illegalName :: B.ByteString -> Bool -illegalName s = B.null s || B.length s > 40 || B.all isSpace s || isSpace (B.head s) || isSpace (B.last s) || B.any isIllegalChar s +illegalName b = B.null b || length s > 40 || all isSpace s || isSpace (head s) || isSpace (last s) || any isIllegalChar s where + s = UTF8.toString b isIllegalChar c = c `List.elem` ("$()*+?[]^{|}\x7F" ++ ['\x00'..'\x1F']) protoNumber2ver :: Word16 -> B.ByteString