Mercurial > prosody-modules
comparison mod_dnsbl/mod_dnsbl.lua @ 6424:ec4a0e4d950e
mod_dnsbl: Fix result and error handling in shell command
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 09 Mar 2026 17:01:53 +0000 |
| parents | 99860e1b817d |
| children | 987f0ee7d395 |
comparison
equal
deleted
inserted
replaced
| 6423:d748985de48f | 6424:ec4a0e4d950e |
|---|---|
| 235 matches = matches + 1; | 235 matches = matches + 1; |
| 236 else | 236 else |
| 237 msg = "[ ]"; | 237 msg = "[ ]"; |
| 238 end | 238 end |
| 239 else | 239 else |
| 240 msg = "[?]"; | 240 msg = "[E]"; |
| 241 end | 241 end |
| 242 | 242 |
| 243 print(msg, dnsbl); | 243 self.session.print(msg, dnsbl); |
| 244 if result.status == "rejected" then | |
| 245 self.session.print(" ", "Error checking list: "..(result.reason:gsub("\n", "\n \t"))); | |
| 246 end | |
| 244 end | 247 end |
| 245 return ("Found in %d of %d lists"):format(matches, total); | 248 return ("Found in %d of %d lists"):format(matches, total); |
| 246 end); | 249 end); |
| 247 end; | 250 end; |
| 248 }); | 251 }); |
