set dnsbl _name to DNSBL, better wording than "failed"

This commit is contained in:
jesopo 2019-12-13 15:12:21 +00:00
parent 31933513d9
commit f332c6abc9

View file

@ -4,6 +4,8 @@ import dns.resolver
from . import lists as _lists
class Module(ModuleManager.BaseModule):
_name = "DNSBL"
@utils.hook("received.command.dnsbl")
def dnsbl(self, event):
args = event["args_split"]
@ -24,7 +26,7 @@ class Module(ModuleManager.BaseModule):
failed = self._check_lists(lists, address)
if failed:
failed = ["%s (%s)" % item for item in failed]
event["stderr"].write("%s failed for lists: %s" %
event["stderr"].write("%s matched for lists: %s" %
(address, ", ".join(failed)))
else:
event["stdout"].write("%s not found in blacklists" % address)