Update modules/botnet_protect.py

This commit is contained in:
Nova Cat 2025-01-11 00:52:10 -08:00
parent 305f6ebe00
commit fd5c004ff1

View file

@ -20,7 +20,7 @@ class IRCatModule:
open(self.ban_provider, "a").write(f"\n{ip} Botnet detected!") open(self.ban_provider, "a").write(f"\n{ip} Botnet detected!")
raise Exception("Botnet detected!") raise Exception("Botnet detected!")
def onSocket(self, ip, socket, value, cachedNick=None, validated=False): def onSocket(self, ip, socket, value, cachedNick=None, validated=False):
if validated: if cachedNick != None:
if cachedNick + "|" + ip in self.memory and self.memory[cachedNick + "|" + ip] != 0: if cachedNick + "|" + ip in self.memory and self.memory[cachedNick + "|" + ip] != 0:
print(value) print(value)
if "JOIN" in value: if "JOIN" in value: