From 020289cd4d7abe72e8cc0908c2073b6802379f03 Mon Sep 17 00:00:00 2001 From: PC-Admin Date: Thu, 3 Aug 2023 20:53:16 +0800 Subject: [PATCH] default testing mode to False, add testing mode warning for user report section --- hardcoded_variables.py | 2 +- report_commands.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hardcoded_variables.py b/hardcoded_variables.py index fda4fee..c800601 100644 --- a/hardcoded_variables.py +++ b/hardcoded_variables.py @@ -12,7 +12,7 @@ rdlist_bot_username = "strong-password" # The password for this user rdlist_recommended_tags = ['hub_room_links', 'hub_room_trade', 'preban', 'degen_misc', 'beastiality', 'degen_porn', 'gore', 'snuff', 'degen_larp', 'hub_room_sussy', 'bot_spam', 'cfm', 'jailbait', 'bot_porn', 'toddlercon', 'loli', 'csam', 'tfm', 'degen_meet', 'stylized_3d_loli', '3d_loli'] # User report generator report_folder = "./reports" # Reports folder name -testing_mode = True # Prevents the incident report feature from messaging/emailing anyone besides you, also limits the number of room states are exported when generating user reports. +testing_mode = False # Prevents the incident report feature from messaging/emailing anyone besides you, also limits the number of room states are exported when generating user reports. # Incident report email settings smtp_user = "abuse@matrix.example.org" smtp_password = "strong-stmp-password" diff --git a/report_commands.py b/report_commands.py index 57165b3..646960f 100644 --- a/report_commands.py +++ b/report_commands.py @@ -59,6 +59,9 @@ remove it from your electronic mailbox. \n********************************************************************** """ +def testing_mode_warning(): + print("\nWARNING! Testing mode is enabled, this will:\n\n- Reduce the amount of data collected in user reports.\n- Slow down rdlist blocking/purging.\n- Prevent the deactivation of accounts.\n- Send incident reports to yourself instead of other homeserver admins.\n") + def get_report_folder(): # Get report_folder from hardcoded_variables report_folder = hardcoded_variables.report_folder @@ -85,6 +88,10 @@ def zip_report_folder(user_report_folder, username): return zip_file_name def generate_user_report(preset_username, report_details): + # Print warning if testing mode is enabled + if hardcoded_variables.testing_mode == True: + testing_mode_warning() + if len(preset_username) == 0: username = input("\nPlease enter the username to automatically generate a report: ") username = user_commands.parse_username(username)