PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.7k stars 908 forks source link

Wiki's Lua recursor scripting examples use 3.x API #7405

Open ncraike opened 5 years ago

ncraike commented 5 years ago

Short description

The Lua scripting examples in the wiki appear to all use the old scripting API from version 3.X instead of the latest 4.1 hooks API.

Description

The Lua scripting examples in the wiki look genuinely great and helpful, but they appear to all use the old scripting API from version 3.X instead of using the latest 4.1 hooks with the DNSQuestion object.

For example, the "the.time" example defines:

function preresolve ( remoteip, domain, qtype )

when the latest hooks documentation documents the signature as preresolve(dq).

I would love to update the wiki directly myself, but I'm just getting started with Lua scripting, so I'm not 100% across all the API changes since 3.X, and I'm not sure how to re-test the examples once I've updated them.

ncraike commented 5 years ago

This needs labels docs and rec.