Class: Plugins::DNSBlacklist
- Inherits:
-
Object
- Object
- Plugins::DNSBlacklist
- Includes:
- Cinch::Helpers, Cinch::Plugin
- Defined in:
- lib/Zeta/plugins/dnsbl.rb
Instance Method Summary collapse
-
#dnsbl_lookup(m, host) ⇒ Object
Methods.
Methods included from Cinch::Plugin
Instance Method Details
#dnsbl_lookup(m, host) ⇒ Object
Methods
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/Zeta/plugins/dnsbl.rb', line 18 def dnsbl_lookup(m, host) client = DNSBL::Client.new query = client.lookup(host.rstrip) if query.empty? m.reply "No Results Found (#{host})" elsif query.last.dnsbl == 'URIBL' && query.last.meaning == '127.0.0.1' m.reply "No Results Found (#{host})" else m.reply "Listed ⁘ #{host} ⁜ #{query.last.meaning} ⁜ Hits: #{query.count}" end end |