#!/usr/bin/env python3 import os print ('Welcome to JPChat') print ('the source code of this service can be found at our admin\'s github') def report_form(): print ('this report will be read by Mozzie-jpg') your_name = input('your name:\n') report_text = input('your report:\n') os.system("bash -c 'echo %s > /opt/jpchat/logs/report.txt'" % your_name) os.system("bash -c 'echo %s >> /opt/jpchat/logs/report.txt'" % report_text) def chatting_service(): print ('MESSAGE USAGE: use [MESSAGE] to message the (currently) only channel') print ('REPORT USAGE: use [REPORT] to report someone to the admins (with proof)') message = input('') if message == '[REPORT]': report_form() if message == '[MESSAGE]': print ('There are currently 0 other users logged in') while True: message2 = input('[MESSAGE]: ') if message2 == '[REPORT]': report_form() chatting_service()