gameServer/Utils.hs
branch0.9.15
changeset 4779 53f7e964a338
parent 4768 d00562929f28
child 4904 0eab727d4717
--- a/gameServer/Utils.hs	Tue Jun 28 01:05:33 2011 +0200
+++ b/gameServer/Utils.hs	Wed Jun 29 21:52:07 2011 +0200
@@ -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"