equal
deleted
inserted
replaced
70 if teamname tm == teamname t then |
70 if teamname tm == teamname t then |
71 tm : ts |
71 tm : ts |
72 else |
72 else |
73 t : replaceTeam tm ts |
73 t : replaceTeam tm ts |
74 |
74 |
|
75 -- NOTE: Don't forget to update the error messages when you change the naming rules! |
75 illegalName :: B.ByteString -> Bool |
76 illegalName :: B.ByteString -> Bool |
76 illegalName b = B.null b || length s > 40 || all isSpace s || isSpace (head s) || isSpace (last s) || any isIllegalChar s |
77 illegalName b = B.null b || length s > 40 || all isSpace s || isSpace (head s) || isSpace (last s) || any isIllegalChar s |
77 where |
78 where |
78 s = UTF8.toString b |
79 s = UTF8.toString b |
79 isIllegalChar c = c `List.elem` ("$()*+?[]^{|}\x7F" ++ ['\x00'..'\x1F']) |
80 isIllegalChar c = c `List.elem` ("$()*+?[]^{|}\x7F" ++ ['\x00'..'\x1F']) |
116 , (50, "0.9.22-dev") |
117 , (50, "0.9.22-dev") |
117 , (51, "0.9.22") |
118 , (51, "0.9.22") |
118 , (52, "0.9.23-dev") |
119 , (52, "0.9.23-dev") |
119 , (53, "0.9.23") |
120 , (53, "0.9.23") |
120 , (54, "0.9.24-dev") |
121 , (54, "0.9.24-dev") |
|
122 , (55, "0.9.24") |
|
123 , (56, "0.9.25-dev") |
121 ] |
124 ] |
122 |
125 |
123 askFromConsole :: B.ByteString -> IO B.ByteString |
126 askFromConsole :: B.ByteString -> IO B.ByteString |
124 askFromConsole msg = do |
127 askFromConsole msg = do |
125 B.putStr msg |
128 B.putStr msg |