Improve #21
10
plugin.py
10
plugin.py
@ -212,13 +212,15 @@ class SnoParser(callbacks.Plugin):
|
|||||||
Queries the cache for an address.
|
Queries the cache for an address.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
data = self.redis_clients['whois'].get(sourceip)
|
data = self.redis_clients['whois'].get(ipaddress)
|
||||||
decoded_data = data.decode("utf-8")
|
if data is not None:
|
||||||
|
data = data.decode("utf-8")
|
||||||
ttl = self.redis_clients['whois'].ttl(ipaddress)
|
ttl = self.redis_clients['whois'].ttl(ipaddress)
|
||||||
count = self.redis_clients['ips'].get(ipaddress)
|
count = self.redis_clients['ips'].get(ipaddress)
|
||||||
decoded_count = count.decode("utf-8")
|
if count is not None:
|
||||||
|
count = count.decode("utf-8")
|
||||||
print("SnoParser manual query: ", data, " ", ttl)
|
print("SnoParser manual query: ", data, " ", ttl)
|
||||||
irc.reply(f"{decoded_data} - Count: {decoded_count} - Remaining: {ttl}s")
|
irc.reply(f"{data} - Count: {count} - Remaining: {ttl}s")
|
||||||
|
|
||||||
ipquery = wrap(ipquery, ["ip"])
|
ipquery = wrap(ipquery, ["ip"])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user