]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
powerdns-example-script.lua: clean up empty lines and spaces 10798/head
authorGeorge Melikov <mail@gmelikov.ru>
Tue, 5 Oct 2021 13:00:52 +0000 (16:00 +0300)
committerGeorge Melikov <mail@gmelikov.ru>
Tue, 5 Oct 2021 13:00:52 +0000 (16:00 +0300)
pdns/recursordist/contrib/powerdns-example-script.lua

index 1a9cab081d6d3ceecc0610f24445f2636d19eba1..adebcb0330734839257cfa3971173b1f267a4071 100644 (file)
@@ -50,31 +50,31 @@ function preresolve(dq)
        then
                pdnslog("Faster magic") -- compares against existing DNSName
        end                           -- sadly, dq.qname == magic2 won't work yet
-        
+
         if blockset:check(dq.qname) then
                 dq.variable = true  -- disable packet cache in any case
                 if dq.qtype == pdns.A then
                        dq:addAnswer(pdns.A, "1.2.3.4")
-                       dq:addAnswer(pdns.TXT, "\"Hello!\"", 3601) -- ttl       
+                       dq:addAnswer(pdns.TXT, "\"Hello!\"", 3601) -- ttl
                        return true;
                end
         end
-        
+
         if dropset:check(dq.qname) then
-               dq.rcode = pdns.DROP  
+               dq.rcode = pdns.DROP
                return true;
         end
 
-               
-        
+
+
         if malwareset:check(dq.qname) then
                dq:addAnswer(pdns.CNAME, "xs.powerdns.com.")
                dq.rcode = 0
                dq.followupFunction="followCNAMERecords"    -- this makes PowerDNS lookup your CNAME
                return true;
-        end        
-        
-       return false; 
+        end
+
+       return false;
 end
 
 
@@ -87,13 +87,13 @@ function nodata(dq)
                dq.followupPrefix="fe80::"
                return true
         end
-        
+
         if dq.qtype == pdns.PTR then
                dq.followupFunction="getFakePTRRecords"
                dq.followupName=dq.qname
                dq.followupPrefix="fe80::"
                return true
-        end        
+        end
        return false
 end