oguh43

Keep secret pl

May 12th, 2020
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.45 KB | None | 0 0
  1. import time, os
  2.  
  3. def follow(thefile):
  4.     thefile.seek(0,2)
  5.     while True:
  6.         line = thefile.readline()
  7.         if not line:
  8.             time.sleep(0.1)
  9.             continue
  10.         yield line
  11.  
  12. data,temp,msg = [],[],[]
  13. sp = " "
  14. logfile = open(os.getenv("APPDATA")+"/.minecraft/logs/latest.log", "r")
  15. loglines = follow(logfile)
  16. for line in loglines:
  17.     if "[main/INFO]: [CHAT]" in line and "Brewery" not in line and "Brew" not in line and "whisper" not in line:
  18.         if "ClearLag" in line and "Entities" in line:
  19.             print(line)
  20.             data.append(line)
  21.             for i in line:
  22.                 i.split(" ")
  23.                 temp.append(i[0])
  24.                 temp.append(i[2:])
  25.                 msg.append(" ".join(temp.copy()))
  26.                 temp.clear()
  27.                 #print(msg)
  28.             #print(msg)
  29.         else:
  30.             print(line)
  31.             data.append(line.split(" "))
  32.             print("DATA",data)
  33.             for i in data:
  34.                 print(i,"IIIIIIIIII")
  35.                
  36.                 temp.append(i[0])
  37.                 temp.append(i[3:])
  38.                 print("temp",temp[1])
  39.                 r = sp.join(map(str,temp))
  40.                 msg.append(r)
  41.                 temp.clear()
  42.                 print("MSG",msg)
  43.             #print(msg)
  44. for i in line:
  45.     i.split(" ")
  46.     temp.append(i[0])
  47.     temp.append(i[2:])
  48.     msg.append(" ".join(temp).copy())
  49.     temp.clear()
  50. print(msg)
Add Comment
Please, Sign In to add comment