lua: standardize hooks and host APIs on PascalCase

This commit is contained in:
Meo597
2026-09-28 22:52:14 +08:00
parent 3d3306503d
commit 5724db08f4
9 changed files with 66 additions and 66 deletions
+2 -2
View File
@@ -37,9 +37,9 @@ func newScriptEngine(path string, server *DNS) (*scriptEngine, error) {
if err != nil {
return nil, err
}
if L.GetGlobal("handleDNSQuery").Type() != lua.LTFunction {
if L.GetGlobal("HandleDNSQuery").Type() != lua.LTFunction {
L.Close()
return nil, errors.New("DNS script must define handleDNSQuery(domain, ipv4, ipv6, fake)")
return nil, errors.New("DNS script must define HandleDNSQuery(domain, ipv4, ipv6, fake)")
}
return L, nil
})