gameServer/Utils.hs
changeset 5269 e32fc0fcaad0
parent 5060 7d0f6e5b1c1c
child 5880 a6573cc5903e
--- a/gameServer/Utils.hs	Mon Jun 20 12:57:44 2011 -0400
+++ b/gameServer/Utils.hs	Mon Jun 20 21:40:08 2011 +0400
@@ -75,7 +75,9 @@
             t : replaceTeam tm ts
 
 illegalName :: B.ByteString -> Bool
-illegalName s = B.null s || B.all isSpace s || isSpace (B.head s) || isSpace (B.last s)
+illegalName s = B.null s || B.all isSpace s || isSpace (B.head s) || isSpace (B.last s) || B.any isIllegalChar s
+    where
+        isIllegalChar c = c `List.elem` "$()*+?[]^{|}"
 
 protoNumber2ver :: Word16 -> B.ByteString
 protoNumber2ver v = Map.findWithDefault "Unknown" v vermap