gameServer/Utils.hs
changeset 4866 64572716e097
parent 4693 6f74c97147fe
child 4904 0eab727d4717
--- a/gameServer/Utils.hs	Fri Jan 21 17:07:42 2011 -0500
+++ b/gameServer/Utils.hs	Sat Jan 22 22:37:12 2011 +0300
@@ -91,7 +91,7 @@
             t : replaceTeam team teams
 
 illegalName :: String -> Bool
-illegalName = all isSpace
+illegalName s = null s || all isSpace s || isSpace (head s) || isSpace (last s)
 
 protoNumber2ver :: Word16 -> String
 protoNumber2ver 17 = "0.9.7-dev"