From: Peter van Dijk Date: Tue, 23 Feb 2016 15:31:29 +0000 (+0100) Subject: add two methods to DNSName for recursor Lua scripting X-Git-Tag: auth-4.0.0-alpha2~12^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3435%2Fhead;p=thirdparty%2Fpdns.git add two methods to DNSName for recursor Lua scripting --- diff --git a/pdns/lua-recursor4.cc b/pdns/lua-recursor4.cc index b976ad8733..4380d69a68 100644 --- a/pdns/lua-recursor4.cc +++ b/pdns/lua-recursor4.cc @@ -264,6 +264,8 @@ RecursorLua4::RecursorLua4(const std::string& fname) d_lw->registerFunction("match", (bool (NetmaskGroup::*)(const ComboAddress&) const)&NetmaskGroup::match); d_lw->registerFunction("toString", [](const DNSName&dn ) { return dn.toString(); }); + d_lw->registerFunction("toStringNoDot", [](const DNSName&dn ) { return dn.toStringNoDot(); }); + d_lw->registerFunction("chopOff", [](DNSName&dn ) { return dn.chopOff(); }); d_lw->registerMember("qname", &DNSQuestion::qname); d_lw->registerMember("qtype", &DNSQuestion::qtype); d_lw->registerMember("localaddr", &DNSQuestion::local);