diff -r 8fd1808b12ed -r db7743e2fad1 gameServer/Utils.hs --- a/gameServer/Utils.hs Wed Feb 24 22:37:03 2016 +0300 +++ b/gameServer/Utils.hs Thu Feb 25 23:17:52 2016 +0300 @@ -241,3 +241,8 @@ deleteFirstsBy2 :: (a -> b -> Bool) -> [a] -> [b] -> [a] deleteFirstsBy2 eq = foldl (flip (deleteBy2 (flip eq))) +sanitizeName :: B.ByteString -> B.ByteString +sanitizeName = B.map sc + where + sc c | isAlphaNum c = c + | otherwise = '_'