From c40890918fbfb5ec1ad1a4bbff469cf7d0014581 Mon Sep 17 00:00:00 2001 From: swee Date: Sun, 22 Dec 2024 20:37:39 -0800 Subject: [PATCH] Update sweebot.py --- sweebot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sweebot.py b/sweebot.py index f768bcc..c0cb296 100644 --- a/sweebot.py +++ b/sweebot.py @@ -343,7 +343,7 @@ while True: logs[channel] = [{"nick": nick, "content": cont}] else: logs[channel].append({"nick": nick, "content": cont}) - if len(logs[channel]) > 128: logs[channel] = logs[channel][:128] + if len(logs[channel]) > 128: logs[channel] = logs[channel][::-1][:128][::-1] #open("log-text-"+channel, "a").write(" ".join(command) + "\n") #open("log-name-"+channel, "a").write(nick + "\n") except: @@ -372,7 +372,7 @@ while True: user = i.lower() except: pass cache = None - for i in logs[channel]: + for i in logs[channel][::-1]: if find in i["content"] and (user == None or i["nick"].lower() == user): cache = i break