# HG changeset patch # User unc0rr # Date 1295725032 -10800 # Node ID 64572716e0977eb4a822c6e756fe6e3bcafa53ed # Parent 3a48fbc4a2810d77af447058608a91d95e2f9f56 Disallow isSpace chars at start and end of nicknames and room names diff -r 3a48fbc4a281 -r 64572716e097 gameServer/Utils.hs --- 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"