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