# HG changeset patch # User unc0rr # Date 1295724953 -10800 # Node ID d00562929f28bc35ea3462b1f0dede62bfa3c2c5 # Parent adef9ec50d6339289725a380336da17d63069b3e Disallow isSpace chars at start and end of nicknames and room names diff -r adef9ec50d63 -r d00562929f28 gameServer/Utils.hs --- 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"