X-Git-Url: http://git.hcoop.net/bpt/portal.git/blobdiff_plain/d5f8418bc9167e9597c463175b38830ba17624b6..4763cfb8e0dc2f6b2d4fd798cc9e3124c3e86288:/util.sml diff --git a/util.sml b/util.sml index a0a649c..ee6c872 100644 --- a/util.sml +++ b/util.sml @@ -64,7 +64,7 @@ fun init () = rnd := Random.rand (SysWord.toInt (Posix.Process.pidToWord (Posix. fun randomPassword () = Int.toString (Int.abs (Random.randInt (!rnd))) fun domainDir dom = - String.concatWith "/" ("/etc/domains" :: String.fields (fn ch => ch = #".") dom) + String.concatWith "/" ("/afs/hcoop.net/common/etc/domtool/nodes/deleuze" :: List.rev (String.fields (fn ch => ch = #".") dom)) fun readFile fname = let @@ -83,4 +83,8 @@ fun mem (x, ls) = List.exists (fn y => y = x) ls val allLower = CharVector.map Char.toLower +fun normEmail s = case String.tokens Char.isSpace (allLower s) of + s :: _ => s + | [] => "" + end