Mercurial > prosody-modules
comparison mod_firewall/mod_firewall.lua @ 5650:0eb2d5ea2428
merge
| author | Stephen Paul Weber <singpolyma@singpolyma.net> |
|---|---|
| date | Sat, 06 May 2023 19:40:23 -0500 |
| parents | 32a9817c7516 |
| children | fa8435a27f7e |
comparison
equal
deleted
inserted
replaced
| 5649:2c69577b28c2 | 5650:0eb2d5ea2428 |
|---|---|
| 556 return nil, "Error compiling (probably a compiler bug, please report): "..err; | 556 return nil, "Error compiling (probably a compiler bug, please report): "..err; |
| 557 end | 557 end |
| 558 local function fire_event(name, data) | 558 local function fire_event(name, data) |
| 559 return module:fire_event(name, data); | 559 return module:fire_event(name, data); |
| 560 end | 560 end |
| 561 local init_ok, initialized_chunk = pcall(chunk); | |
| 562 if not init_ok then | |
| 563 return nil, "Error initializing compiled rules: "..initialized_chunk; | |
| 564 end | |
| 561 return function (pass_return) | 565 return function (pass_return) |
| 562 return chunk()(active_definitions, fire_event, logger(filename), module, pass_return); -- Returns event handler with upvalues | 566 return initialized_chunk(active_definitions, fire_event, logger(filename), module, pass_return); -- Returns event handler with upvalues |
| 563 end | 567 end |
| 564 end | 568 end |
| 565 | 569 |
| 566 local function resolve_script_path(script_path) | 570 local function resolve_script_path(script_path) |
| 567 local relative_to = prosody.paths.config; | 571 local relative_to = prosody.paths.config; |
