From 1369475afe8c9f6c541e5c06255a49b458258d94 Mon Sep 17 00:00:00 2001 From: swee Date: Sat, 11 Jan 2025 01:04:11 -0800 Subject: [PATCH] Update modules/botnet_protect.py --- modules/botnet_protect.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/botnet_protect.py b/modules/botnet_protect.py index df0d507..ec66b97 100644 --- a/modules/botnet_protect.py +++ b/modules/botnet_protect.py @@ -23,15 +23,15 @@ class IRCatModule: raise Exception("Botnet detected!") def onSocket(self, ip, socket, value, cachedNick=None, validated=False): if cachedNick != None: - if not (ip in self.memory and self.memory[ip] == 0): - print(value) - if "JOIN" in value: - target = value.split(" ")[1] - self.memory[ip] = 1 # 1: Just joined the channel, continue observing. - print("Autoban> Somebody joined " + target) - if target.lower() == "#ircatsucks": - self.ban(ip) - elif "PRIVMSG" in value: + print(value) + if "JOIN" in value: + target = value.split(" ")[1] + self.memory[ip] = 1 # 1: Just joined the channel, continue observing. + print("Autoban> Somebody joined " + target) + if target.lower() == "#ircatsucks": + self.ban(ip) + elif "PRIVMSG" in value: + if not (ip in self.memory and self.memory[ip] == 0): target = value.split(" ")[1] content = " ".join(value.split(" ")[2:])[1:] if content in self.sus_strings: