Skip to content

Commit

Permalink
update[patcher]: Remove more telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
VensGTH committed Sep 16, 2024
1 parent d567637 commit e19907f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t5de/patches/python/AccountPatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def __init__(self):

def patch(self, context):
if context.pattern == "ENABLE_CREATOR":
context.write(context.line)
context.write("return True\n", indent=2)
context.seek(1)
context.write("def isCreator(self):", indent=1)
context.write("return True\n\n", indent=2)
context.write(context.line.replace("isCreator", "chkCreator"))
elif context.pattern == "DISABLE_CLIENT_ADS":
context.write(context.line)
context.write("return False\n", indent=2)
Expand Down
18 changes: 18 additions & 0 deletions t5de/patches/python/TelemetryPatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def __init__(self):
self.register('TELEMETRY_9', 'main/SendIMVULogs.py', r'def send_internal')
self.register('TELEMETRY_10', 'imvu/devicefingerprint.py', r'import')
self.register('TELEMETRY_11', 'imvu/log.py', r'def getRecords')
self.register('TELEMETRY_12', 'imvu/mode/HomeMode.py', r'def loadFPEdgeUrl')
self.register('TELEMETRY_13', 'imvu/account.py', r'def getUpdateInfo')
self.register('TELEMETRY_14', 'imvu/account.py', r'self\.__factReporter\.recordFact')
self.register('TELEMETRY_15', 'imvu/account.py', r'self\.__factReporter\.recordFactOnlyOnce')

def patch(self, context):
if context.pattern == 'TELEMETRY_1':
Expand Down Expand Up @@ -63,3 +67,17 @@ def patch(self, context):
elif context.pattern == 'TELEMETRY_11':
context.write(context.line)
context.write('self.clearRecords()', indent=2)
elif context.pattern == 'TELEMETRY_12':
context.write(context.line)
context.skip(5)
context.write('pass', indent=2)
elif context.pattern == 'TELEMETRY_13':
context.write('def shouldRecordFact(self, fact_type):', indent=1)
context.write('__facts = ["NUI:CreatorMode", "NUI:ProductEditMode", "Create Mode Edit Pid", "Create Mode Derive Pid", "Create Mode Open Chkn", "Create Mode Open Cfl"]', indent=2)
context.write('if (fact_type in __facts) and not self.chkCreator():', indent=2)
context.write('return False', indent=3)
context.write('return True\n\n', indent=2)
context.write(context.line)
elif context.pattern in ('TELEMETRY_14', 'TELEMETRY_15'):
context.write('if self.shouldRecordFact(fact_type):', indent=2)
context.write(context.line, indent=1)

0 comments on commit e19907f

Please sign in to comment.