gameServer/Utils.hs
branch0.9.15
changeset 4768 d00562929f28
parent 4693 6f74c97147fe
child 4904 0eab727d4717
--- a/gameServer/Utils.hs	Sat Jan 22 01:38:01 2011 +0100
+++ b/gameServer/Utils.hs	Sat Jan 22 22:35:53 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"