Update modules/botnet_protect.py

This commit is contained in:
Nova Cat 2025-01-11 01:04:11 -08:00
parent 9d4de13e7c
commit 1369475afe

View file

@ -23,7 +23,6 @@ class IRCatModule:
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 cachedNick != None: if cachedNick != None:
if not (ip in self.memory and self.memory[ip] == 0):
print(value) print(value)
if "JOIN" in value: if "JOIN" in value:
target = value.split(" ")[1] target = value.split(" ")[1]
@ -32,6 +31,7 @@ class IRCatModule:
if target.lower() == "#ircatsucks": if target.lower() == "#ircatsucks":
self.ban(ip) self.ban(ip)
elif "PRIVMSG" in value: elif "PRIVMSG" in value:
if not (ip in self.memory and self.memory[ip] == 0):
target = value.split(" ")[1] target = value.split(" ")[1]
content = " ".join(value.split(" ")[2:])[1:] content = " ".join(value.split(" ")[2:])[1:]
if content in self.sus_strings: if content in self.sus_strings: