Update sweebot.py
All checks were successful
Check syntax / check (push) Successful in 12s

This commit is contained in:
Nova Cat 2024-12-22 20:37:39 -08:00
parent 34ba0c15f5
commit c40890918f

View file

@ -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