def __process_instructions(self, inst):
to_send = []<EOL>for cmd, msg, com in inst:<EOL><INDENT>if cmd not in config.CMDS:  <EOL><INDENT>continue<EOL><DEDENT>if cmd == '<STR_LIT>':<EOL><INDENT>if self.mode == '<STR_LIT:s>':<EOL><INDENT>to_send.append((msg, com))<EOL><DEDENT>if self.color:<EOL><INDENT>txt = config.Col.BOLD + msg + config.Col.ENDC<EOL><DEDENT>else:<EOL><INDENT>txt = msg<EOL><DEDENT>print(txt)<EOL>if self.issue_alert:<EOL><INDENT>os.system(self.alert)<EOL><DEDENT><DEDENT>elif cmd == '<STR_LIT>':<EOL><INDENT>if self.mode == '<STR_LIT:s>':  <EOL><INDENT>com.close()<EOL>with self.__client_list_lock:<EOL><INDENT>self.clients.remove(com)<EOL><DEDENT><DEDENT>else:  <EOL><INDENT>self.__s.close()<EOL>self.__make_client()  <EOL><DEDENT><DEDENT>elif cmd == '<STR_LIT>':<EOL><INDENT>if self.mode == '<STR_LIT:c>':  <EOL><INDENT>self.__s.close()<EOL>self.__make_server()<EOL><DEDENT><DEDENT><DEDENT>for msg, sender in to_send:<EOL><INDENT>if self.mode == '<STR_LIT:c>':<EOL><INDENT>utils.msg(msg, self.__s)<EOL><DEDENT>else:<EOL><INDENT>with self.__client_list_lock:<EOL><INDENT>for com in self.clients:<EOL><INDENT>if com == sender:<EOL><INDENT>continue<EOL><DEDENT>utils.msg(msg, com)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Act on instructions recieved