Last active
March 5, 2020 23:06
-
-
Save Yepoleb/fee896f9834fd2e17a949f32ab471b41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import string | |
import os | |
LOGFILE_NAME = os.path.expanduser( | |
"~/.steam/steam/steamapps/common/Team Fortress 2/tf/console.log") | |
# TF2 launch options: -rpt | |
f = open(LOGFILE_NAME) | |
cheaters = set() | |
while True: | |
line = f.readline() | |
match = re.match(r"^(?:\*DEAD\* )?(.*?)\u200f? : \x1b", line) | |
if match: | |
cheater_name = match.group(1) | |
if cheater_name not in cheaters: | |
cheaters.add(cheater_name) | |
print(cheater_name) | |
if line.endswith("connected\n") and "niggerkiller" in line.lower(): | |
print("Niggerkiller joined") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment