# HG changeset patch
# User unc0rr
# Date 1295893946 -10800
# Node ID af2e231bd9beb5dba5a58b4019a38177b276e7d0
# Parent  4e61c2a42121fc646a04c495f131a73b82578c06
Apply new nick restrictions in server rewrite too

diff -r 4e61c2a42121 -r af2e231bd9be gameServer/Utils.hs
--- a/gameServer/Utils.hs	Mon Jan 10 18:57:44 2011 +0300
+++ b/gameServer/Utils.hs	Mon Jan 24 21:32:26 2011 +0300
@@ -77,7 +77,9 @@
             t : replaceTeam team teams
 
 illegalName :: B.ByteString -> Bool
-illegalName = all isSpace . B.unpack
+illegalName b = null s || all isSpace s || isSpace (head s) || isSpace (last s)
+    where
+        s = B.unpack b
 
 protoNumber2ver :: Word16 -> B.ByteString
 protoNumber2ver v = Map.findWithDefault "Unknown" v vermap