gameServer/Utils.hs
changeset 5060 7d0f6e5b1c1c
parent 5030 42746c5d4a80
child 5269 e32fc0fcaad0
--- a/gameServer/Utils.hs	Mon Mar 28 20:30:15 2011 +0400
+++ b/gameServer/Utils.hs	Mon Mar 28 20:31:01 2011 +0400
@@ -124,3 +124,6 @@
   case B.readInt str of
        Just (i, t) | B.null t -> fromIntegral i
        _                      -> 0 
+
+cutHost :: B.ByteString -> B.ByteString
+cutHost = B.intercalate "." .  flip (++) ["*","*"] . List.take 2 . B.split '.'