mirror of
https://github.com/PC-Admin/matrix-moderation-tool.git
synced 2025-03-10 21:40:28 -04:00
Cleanup draft section
This commit is contained in:
parent
0cf13c6fd8
commit
9b7857755f
41
modtool.py
41
modtool.py
@ -406,9 +406,6 @@ def quarantine_users_media():
|
||||
# Example:
|
||||
# $ curl -X POST https://matrix.perthchat.org/_synapse/admin/v1/user/@PC-Admin:perthchat.org/media/quarantine?access_token=ACCESS_TOKEN
|
||||
|
||||
def remove_users_media():
|
||||
print("null")
|
||||
|
||||
def shutdown_room(preset_internal_ID,preset_user_ID,preset_new_room_name,preset_message,preset_purge_choice,preset_block_choice):
|
||||
if preset_internal_ID == '':
|
||||
internal_ID = input("\nEnter the internal id of the room you want shutdown (Example: !OLkDvaYjpNrvmwnwdj:matrix.org): ")
|
||||
@ -820,7 +817,7 @@ if length_access_token == 0:
|
||||
|
||||
pass_token = False
|
||||
while pass_token == False:
|
||||
menu_input = input('\nPlease select one of the following options:\n#### User Account Commands ####\n1) Deactivate a user account.\n2) Create a user account.\n3) Query user account.\n4) List room memberships of user.\n5) Query multiple user accounts.\n6) Reset a users password.\n7) Promote a user to server admin.\n8) List all user accounts.\n9) Create multiple user accounts.\n10) Deactivate multiple user accounts.\n11) Quarantine all media a users uploaded.\n12) Delete a users uploaded media.\n#### Room Commands ####\n13) List details of a room.\n14) List rooms in public directory.\n15) Remove a room from the public directory.\n16) Remove multiple rooms from the public directory.\n17) Redact a room event. (Like abusive avatars or display names.) \n18) List/Download all media in a room.\n19) Download media from multiple rooms.\n20) Quarantine all media in a room.\n21) Shutdown a room.\n22) Shutdown multiple rooms.\n23) Delete a room.\n24) Delete multiple rooms.\n25) Purge the event history of a room to a specific timestamp.\n26) Purge the event history of multiple rooms to a specific timestamp.\n#### Server Commands ####\n27) Delete and block a specific media. (Like an abusive avatar.) \n28) Purge remote media repository up to a certain date.\n29) Prepare database for copying events of multiple rooms.\n(\'q\' or \'e\') Exit.\n\n')
|
||||
menu_input = input('\nPlease select one of the following options:\n#### User Account Commands ####\n1) Deactivate a user account.\n2) Create a user account.\n3) Query user account.\n4) List room memberships of user.\n5) Query multiple user accounts.\n6) Reset a users password.\n7) Promote a user to server admin.\n8) List all user accounts.\n9) Create multiple user accounts.\n10) Deactivate multiple user accounts.\n11) Quarantine all media a users uploaded.\n#### Room Commands ####\n12) List details of a room.\n13) List rooms in public directory.\n14) Remove a room from the public directory.\n15) Remove multiple rooms from the public directory.\n16) Redact a room event. (Like abusive avatars or display names.) \n17) List/Download all media in a room.\n18) Download media from multiple rooms.\n19) Quarantine all media in a room.\n20) Shutdown a room.\n21) Shutdown multiple rooms.\n22) Delete a room.\n23) Delete multiple rooms.\n24) Purge the event history of a room to a specific timestamp.\n25) Purge the event history of multiple rooms to a specific timestamp.\n#### Server Commands ####\n26) Delete and block a specific media. (Like an abusive avatar.) \n27) Purge remote media repository up to a certain date.\n28) Prepare database for copying events of multiple rooms.\n(\'q\' or \'e\') Exit.\n\n')
|
||||
if menu_input == "1":
|
||||
deactivate_account('')
|
||||
elif menu_input == "2":
|
||||
@ -844,43 +841,41 @@ while pass_token == False:
|
||||
elif menu_input == "11":
|
||||
quarantine_users_media()
|
||||
elif menu_input == "12":
|
||||
remove_users_media()
|
||||
elif menu_input == "13":
|
||||
list_room_details('')
|
||||
elif menu_input == "14":
|
||||
elif menu_input == "13":
|
||||
list_directory_rooms()
|
||||
elif menu_input == "15":
|
||||
elif menu_input == "14":
|
||||
remove_room_from_directory('')
|
||||
elif menu_input == "16":
|
||||
elif menu_input == "15":
|
||||
remove_multiple_rooms_from_directory()
|
||||
elif menu_input == "17":
|
||||
elif menu_input == "16":
|
||||
redact_room_event()
|
||||
elif menu_input == "18":
|
||||
elif menu_input == "17":
|
||||
list_and_download_media_in_room('','','','./')
|
||||
elif menu_input == "19":
|
||||
elif menu_input == "18":
|
||||
download_media_from_multiple_rooms()
|
||||
elif menu_input == "20":
|
||||
elif menu_input == "19":
|
||||
quarantine_media_in_room()
|
||||
elif menu_input == "21":
|
||||
elif menu_input == "20":
|
||||
shutdown_room('','','','','','')
|
||||
elif menu_input == "22":
|
||||
elif menu_input == "21":
|
||||
shutdown_multiple_rooms()
|
||||
elif menu_input == "23":
|
||||
elif menu_input == "22":
|
||||
delete_room('')
|
||||
elif menu_input == "24":
|
||||
elif menu_input == "23":
|
||||
delete_multiple_rooms()
|
||||
elif menu_input == "25":
|
||||
elif menu_input == "24":
|
||||
purge_room_to_timestamp('','')
|
||||
elif menu_input == "26":
|
||||
elif menu_input == "25":
|
||||
purge_multiple_rooms_to_timestamp()
|
||||
elif menu_input == "27":
|
||||
elif menu_input == "26":
|
||||
delete_block_media()
|
||||
elif menu_input == "28":
|
||||
elif menu_input == "27":
|
||||
purge_remote_media_repo()
|
||||
elif menu_input == "29":
|
||||
elif menu_input == "28":
|
||||
prepare_database_copy_of_multiple_rooms()
|
||||
elif menu_input == "q" or menu_input == "Q" or menu_input == "e" or menu_input == "E":
|
||||
print("\nExiting...\n")
|
||||
pass_token = True
|
||||
else:
|
||||
print("\nIncorrect input detected, please select a number from 1 to 21!\n")
|
||||
print("\nIncorrect input detected, please select a number from 1 to 28!\n")
|
||||
|
Loading…
x
Reference in New Issue
Block a user