]> gitweb.michael.orlitzky.com - dead/harbl.git/blobdiff - harbl/src/Network/DNS/RBL/Site.hs
Replace 'UserDomain' with 'Host' in the library.
[dead/harbl.git] / harbl / src / Network / DNS / RBL / Site.hs
similarity index 97%
rename from src/Network/DNS/RBL/Site.hs
rename to harbl/src/Network/DNS/RBL/Site.hs
index 2bc63fa6e93a7113c059ff72081a7e03ebbe2179..ef0df315d678a58782f343df2f9d9abe8a58bcef 100644 (file)
@@ -4,13 +4,12 @@
 --
 --     postscreen_dnsbl_sites = bl.mailspike.net=127.0.0.[2;10;11]*2, ...
 --
---   Here, the blacklist (a 'UserDomain') is \"bl.mailspike.net\", the
+--   Here, the blacklist (a 'Host') is \"bl.mailspike.net\", the
 --   return code pattern is \"127.0.0.[2;10;11]\", and the weight is
 --   \"2".
 --
 module Network.DNS.RBL.Site (
   Site(..),
-  Weight(..),
   site_tests,
   sites )
 where
@@ -34,7 +33,7 @@ import Text.Parsec (
 import Text.Parsec.String ( Parser )
 import Text.Read ( readMaybe )
 
-import Network.DNS.RBL.Domain ( UserDomain, user_domain )
+import Network.DNS.RBL.Host ( Host, host )
 import Network.DNS.RBL.IPv4Pattern ( IPv4Pattern, v4pattern )
 import Network.DNS.RBL.Pretty ( Pretty(..) )
 
@@ -99,7 +98,7 @@ weight = try parse_weight <|> return (Weight 1)
 --   (DNS) name, a pattern of addresses to use for a \"hit\", and a
 --   weight multiplier.
 --
-data Site = Site UserDomain (Maybe IPv4Pattern) Weight
+data Site = Site Host (Maybe IPv4Pattern) Weight
 
 
 -- | Pretty print DNSBL sites. This is straightforward except for the
@@ -148,7 +147,7 @@ instance Pretty Site where
 --
 site :: Parser Site
 site = do
-  d <- user_domain
+  d <- host
   return_codes <- optionMaybe $ char '=' >> v4pattern
   w <- weight
   return $ Site d return_codes w